| 
      
            Lines 20-25
          use Modern::Perl;
      
      
        Link Here
      
     | 
  
        
          | 20 | 
           | 
          20 | 
           | 
        
        
          | 21 | 
          Getopt::Long::Configure("bundling"); | 
          21 | 
          Getopt::Long::Configure("bundling"); | 
        
        
          | 22 | 
           | 
          22 | 
           | 
        
            
               | 
               | 
              23 | 
              my $pwd = `pwd`;  | 
            
        
          | 23 | 
          my %opts;  | 
          24 | 
          my %opts;  | 
        
        
          | 24 | 
          my $res = GetOptions( \%opts, "command|c=s", "help|h", "login|l", "shell|s=s",  | 
          25 | 
          my $res = GetOptions( \%opts, "command|c=s", "help|h", "login|l", "shell|s=s",  | 
        
        
          | 25 | 
              "preserve-environment|p|m", "verbose|v" );  | 
          26 | 
              "preserve-environment|p|m", "verbose|v" );  | 
        
  
    | 
      
            Lines 51-57
          push @su_args,
      
      
        Link Here
      
     | 
  
        
          | 51 | 
              "env "  | 
          52 | 
              "env "  | 
        
        
          | 52 | 
            . "KOHA_CONF=/etc/koha/sites/$instance/koha-conf.xml "  | 
          53 | 
            . "KOHA_CONF=/etc/koha/sites/$instance/koha-conf.xml "  | 
        
        
          | 53 | 
            . "PERL5LIB=$perl5lib $shell"  | 
          54 | 
            . "PERL5LIB=$perl5lib $shell"  | 
        
          
            
              | 54 | 
                . ( $opts{command} ? " -c '$opts{command}'" : '' ); | 
              55 | 
                . ( $opts{command} ? " -c '$opts{command}'" : " -c 'cd \"$pwd\"; $shell'" ); | 
            
        
          | 55 | 
           | 
          56 | 
           | 
        
        
          | 56 | 
          print "Command: '".join("' '",@su_args)."'\n" if $opts{verbose}; | 
          57 | 
          print "Command: '".join("' '",@su_args)."'\n" if $opts{verbose}; | 
        
        
          | 57 | 
          system("@su_args"); | 
          58 | 
          system("@su_args"); | 
        
            
              | 58 | 
              -   | 
               | 
               |