From: Michal Sojka Date: Sun, 27 Aug 2017 19:31:05 +0000 (+0200) Subject: Rework system_verbose() to accept string or array, similarly as system() does X-Git-Tag: 20170907~23 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/novaboot.git/commitdiff_plain/e3c0ed5e978cbcd9c2ccef00f808de9af6903fad?ds=sidebyside Rework system_verbose() to accept string or array, similarly as system() does --- diff --git a/novaboot b/novaboot index 538f150..cc25d55 100755 --- 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"); }