Changeset 926 for dasscm/trunk/usr/bin
- Timestamp:
- Jul 30, 2010, 6:45:47 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dasscm/trunk/usr/bin/dasscm
r924 r926 696 696 my $command = shift; 697 697 698 #print "executing command: " . $command . "\n"; 699 700 open( RESULT, "LANG=C " . $command . ' 2>&1 |' ); 701 my @result = <RESULT>; 702 close(RESULT); 698 if ($verbose) { 699 print "executing command: " . $command . "\n"; 700 } 701 702 my @result; 703 if( open( RESULT, $command . ' 2>&1 |' ) ) { 704 @result = <RESULT>; 705 close(RESULT); 706 } 703 707 my $retcode = $? >> 8; 704 708 705 #print @result; 706 #if( $retcode ) { print "return code: " . $retcode . "\n"; } 709 if ($verbose) { 710 print @result; 711 if( $retcode ) { print "return code: " . $retcode . "\n"; } 712 } 707 713 708 714 return ( $retcode, @result ); … … 790 796 my $plugin_name = substr( $plugin, length("DASSCM_PLUGIN_CMD_") ); 791 797 my $plugin_test = $config->{ 'DASSCM_PLUGIN_TEST_' . $plugin_name }; 792 ( my $rc_test, my @result_test ) = run_command($plugin_test);793 798 if ($verbose) { print "Plugin $plugin_name: "; } 799 # all plugins are executed with LANG settings C 800 # bash -c is used, to supress all output 801 # (otherwise there are problem with && commands) 802 ( my $rc_test, my @result_test ) = run_command( "LANG=C bash -c " . $plugin_test); 794 803 if ( $rc_test != 0 ) { 795 804 if ($verbose) { print "skipped\n"; }
Note:
See TracChangeset
for help on using the changeset viewer.