]> git.proxmox.com Git - pve-installer.git/blobdiff - proxinstall
fix for run_command
[pve-installer.git] / proxinstall
index d0bf5c8692d979157c70cf0d8331d145a8baf2c3..4bbbf26cfa21e32401d9a14f91387d5099e45049 100755 (executable)
@@ -158,8 +158,12 @@ sub run_command {
     } else {
        $cmdtxt = "# $cmdstr\n";
     }
-    print $cmdtxt;
-    STDOUT->flush();
+
+    if ($opt_testmode) {
+       print $cmdtxt;
+       STDOUT->flush();
+    }
+
     print $logfd $cmdtxt;
 
     my $reader = IO::File->new();
@@ -235,7 +239,7 @@ sub run_command {
     my $ec = ($? >> 8);
 
     if ($ec) {
-       die "command '$cmd' failed with exit code $ec";
+       die "command '$cmdstr' failed with exit code $ec";
     }
 
     return $ostream;