]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
Rework system_verbose() to accept string or array, similarly as system() does
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 27 Aug 2017 19:31:05 +0000 (21:31 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 27 Aug 2017 19:37:10 +0000 (21:37 +0200)
novaboot

index 538f150d147e71e9700b173f9f780f2946c5badd..cc25d55e698215d038a3c48543770e52eed27a22 100755 (executable)
--- a/novaboot
+++ b/novaboot
@@ -623,11 +623,10 @@ sub exec_verbose(@)
     exit(1); # should not be reached
 }
 
-sub system_verbose($)
+sub system_verbose
 {
-    my $cmd = shift;
-    print STDERR "novaboot: Running: $cmd\n";
-    my $ret = system($cmd);
+    print STDERR "novaboot: Running: ".shell_cmd_string(@_)."\n";
+    my $ret = system(@_);
     if ($ret & 0x007f) { die("Command terminated by a signal"); }
     if ($ret & 0xff00) {die("Command exit with non-zero exit code"); }
     if ($ret) { die("Command failure $ret"); }