mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 11:22:27 +00:00 
			
		
		
		
	Redirect STDOUT only in verbose mode - Line #133
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@474 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -117,7 +117,6 @@ sub connect { | ||||
|     ################################################## | ||||
|     if ( $verbose ) { | ||||
|         close STDERR; | ||||
|  | ||||
|         if ( !open( STDERR, '>', \$expect_log )) { | ||||
|              return( "Unable to redirect STDERR: $!" ); | ||||
|         } | ||||
| @@ -131,12 +130,12 @@ sub connect { | ||||
|     ################################################## | ||||
|     # Redirect STDOUT to variable  | ||||
|     ################################################## | ||||
|     close STDOUT; | ||||
|  | ||||
|     if ( !open( STDOUT, '>', \$expect_log )) { | ||||
|          return( "Unable to redirect STDOUT: $!" ); | ||||
|     } | ||||
|  | ||||
|     if ( $verbose ) { | ||||
|         close STDOUT; | ||||
|         if ( !open( STDOUT, '>', \$expect_log )) { | ||||
|              return( "Unable to redirect STDOUT: $!" ); | ||||
|         } | ||||
|     }        | ||||
|     unless ( $ssh->spawn( "ssh", $parameters )) { | ||||
|         return( $expect_log."Unable to spawn ssh connection to server" ); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user