[Fai-commit] r3656 - people/michael/features/setup_harddisks_2/implementation

fai-commit at lists.alioth.debian.org fai-commit at lists.alioth.debian.org
Sun Jul 23 10:56:29 UTC 2006


Author: michael-guest
Date: 2006-07-23 10:56:29 +0000 (Sun, 23 Jul 2006)
New Revision: 3656

Modified:
   people/michael/features/setup_harddisks_2/implementation/shdd2-exec
Log:


Modified: people/michael/features/setup_harddisks_2/implementation/shdd2-exec
===================================================================
--- people/michael/features/setup_harddisks_2/implementation/shdd2-exec	2006-07-23 10:52:37 UTC (rev 3655)
+++ people/michael/features/setup_harddisks_2/implementation/shdd2-exec	2006-07-23 10:56:29 UTC (rev 3656)
@@ -66,20 +66,24 @@
 {
   my ( $command, $stdout_ref, $stderr_ref ) = @_;
   my $err = &execute_command( $command, $stdout_ref, $stderr_ref );
-  my $response = &get_error( $err, "response" );
-  my $message  = &get_error( $err, "message" );
-
-  if ( $response eq "die" )
+  unless( $err eq "")
   {
-    die $message;
-  }
+    my $response = &get_error( $err, "response" );
+    my $message  = &get_error( $err, "message" );
 
-  if ( $response eq "warn" )
-  {
-    warn $message;
+    if ( $response eq "die" )
+    {
+      die $message;
+    }
+
+    if ( $response eq "warn" )
+    {
+      warn $message;
+    }
+
+    return $err;
   }
-
-  return $err;
+  return "";
 }
 
 sub execute_command
@@ -102,7 +106,7 @@
   else
   {
     printf
-"would run command $command, to run in NO_DRY_MODE, please set environment variable NO_DRY_RUN to 1";
+"would run command $command, to run in NO_DRY_MODE, please set environment variable NO_DRY_RUN to 1 \n";
   }
 
   @stderr = <$stderr_fh>;




More information about the Fai-commit mailing list