Normal unix shell pipe return the exits status of the last command.
If pipefail is enabled, the pipeline's return status is the value of
the last (rightmost) command to exit with a non-zero status, or zero
if all commands exit successfully.
RELEASE=2.2
VERSION=1.0
-PKGREL=36
+PKGREL=37
PACKAGE=libpve-common-perl
if (!ref($cmd)) {
$cmdstr = $cmd;
- $cmd = [ $cmd ];
+ if ($cmd =~ m/|/) {
+ # see 'man bash' for option pipefail
+ $cmd = [ '/bin/bash', '-c', "set -o pipefail && $cmd" ];
+ } else {
+ $cmd = [ $cmd ];
+ }
} else {
$cmdstr = cmd2string($cmd);
}
+libpve-common-perl (1.0-37) unstable; urgency=low
+
+ * fix bug #264: use option pipefail for shell commands
+
+ -- Proxmox Support Team <support@proxmox.com> Mon, 29 Oct 2012 09:45:11 +0100
+
libpve-common-perl (1.0-36) unstable; urgency=low
* new helper wait_for_vnc_port()