From: Ansgar Burchardt Date: Thu, 12 Jul 2012 15:48:28 +0000 (-0600) Subject: use "set -o pipefail" for shell scripts X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7538a1a1c81d363bc685bea55e220763280c0c16;p=dak use "set -o pipefail" for shell scripts Signed-off-by: Ansgar Burchardt --- diff --git a/config/backports/cron.daily b/config/backports/cron.daily index 23f2f669..d5775243 100755 --- a/config/backports/cron.daily +++ b/config/backports/cron.daily @@ -2,6 +2,7 @@ # set -e +set -o pipefail set -u export SCRIPTVARS=/srv/backports-master.debian.org/dak/config/backports/vars diff --git a/config/backports/cron.dinstall b/config/backports/cron.dinstall index 2c942962..4d3bef8f 100755 --- a/config/backports/cron.dinstall +++ b/config/backports/cron.dinstall @@ -27,6 +27,7 @@ # exit on errors set -e +set -o pipefail # make sure to only use defined variables set -u # ERR traps should be inherited from functions too. (And command diff --git a/config/backports/cron.hourly b/config/backports/cron.hourly index f973606e..627c8b09 100755 --- a/config/backports/cron.hourly +++ b/config/backports/cron.hourly @@ -3,6 +3,7 @@ # Executed hourly via cron, out of dak's crontab. set -e +set -o pipefail set -u export SCRIPTVARS=/srv/backports-master.debian.org/dak/config/backports/vars diff --git a/config/backports/cron.monthly b/config/backports/cron.monthly index 38a57fd1..34593a3e 100755 --- a/config/backports/cron.monthly +++ b/config/backports/cron.monthly @@ -2,6 +2,7 @@ # set -e +set -o pipefail set -u export SCRIPTVARS=/srv/backports-master.debian.org/dak/config/backports/vars diff --git a/config/backports/cron.reboot b/config/backports/cron.reboot index a5a132ea..1e2e8d98 100755 --- a/config/backports/cron.reboot +++ b/config/backports/cron.reboot @@ -18,6 +18,7 @@ # exit on errors set -e +set -o pipefail # make sure to only use defined variables set -u # ERR traps should be inherited from functions too. (And command diff --git a/config/backports/cron.unchecked b/config/backports/cron.unchecked index 423ce77d..13be8d59 100755 --- a/config/backports/cron.unchecked +++ b/config/backports/cron.unchecked @@ -17,6 +17,7 @@ # exit on errors set -e +set -o pipefail # make sure to only use defined variables set -u # ERR traps should be inherited from functions too. (And command diff --git a/config/backports/cron.weekly b/config/backports/cron.weekly index 1929e10f..ee57d39f 100755 --- a/config/backports/cron.weekly +++ b/config/backports/cron.weekly @@ -2,6 +2,7 @@ # set -e +set -o pipefail set -u # ERR traps should be inherited from functions too. (And command # substitutions and subshells and whatnot, but for us the functions is diff --git a/config/debian-security/cron.buildd b/config/debian-security/cron.buildd index 970a2322..016b1af5 100755 --- a/config/debian-security/cron.buildd +++ b/config/debian-security/cron.buildd @@ -3,6 +3,7 @@ # Executed after cron.unchecked set -e +set -o pipefail set -u export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars diff --git a/config/debian-security/cron.daily b/config/debian-security/cron.daily index 3c34d769..bfa6dd38 100755 --- a/config/debian-security/cron.daily +++ b/config/debian-security/cron.daily @@ -3,6 +3,7 @@ # Executed daily via cron, out of dak's crontab. set -e +set -o pipefail export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars . $SCRIPTVARS diff --git a/config/debian-security/cron.hourly b/config/debian-security/cron.hourly index ddbf09fc..6a698057 100755 --- a/config/debian-security/cron.hourly +++ b/config/debian-security/cron.hourly @@ -3,6 +3,7 @@ # Executed hourly via cron, out of dak's crontab. set -e +set -o pipefail set -u export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars diff --git a/config/debian-security/cron.unchecked b/config/debian-security/cron.unchecked index d8ae4534..7baf55ac 100755 --- a/config/debian-security/cron.unchecked +++ b/config/debian-security/cron.unchecked @@ -1,6 +1,7 @@ #! /bin/bash set -e +set -o pipefail set -u export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars diff --git a/config/debian-security/cron.weekly b/config/debian-security/cron.weekly index 15c9d16f..8843ac1c 100755 --- a/config/debian-security/cron.weekly +++ b/config/debian-security/cron.weekly @@ -3,6 +3,7 @@ # Executed weekly via cron, out of dak's crontab. set -e +set -o pipefail export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars . $SCRIPTVARS diff --git a/config/debian/cron.daily b/config/debian/cron.daily index 172b5bba..182e103b 100755 --- a/config/debian/cron.daily +++ b/config/debian/cron.daily @@ -3,6 +3,7 @@ # Run daily via cron, out of dak's crontab. set -e +set -o pipefail set -u export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars . $SCRIPTVARS diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index d2443f79..0fcf599c 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -27,6 +27,7 @@ # exit on errors set -e +set -o pipefail # make sure to only use defined variables set -u # ERR traps should be inherited from functions too. (And command diff --git a/config/debian/cron.hourly b/config/debian/cron.hourly index 39a4d0d8..2b80ffe1 100755 --- a/config/debian/cron.hourly +++ b/config/debian/cron.hourly @@ -3,6 +3,7 @@ # Executed hourly via cron, out of dak's crontab. set -e +set -o pipefail set -u export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars diff --git a/config/debian/cron.monthly b/config/debian/cron.monthly index 980cb6d6..3ca4a81a 100755 --- a/config/debian/cron.monthly +++ b/config/debian/cron.monthly @@ -3,6 +3,7 @@ # Run at the beginning of the month via cron, out of dak's crontab. set -e +set -o pipefail set -u export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars . $SCRIPTVARS diff --git a/config/debian/cron.reboot b/config/debian/cron.reboot index b0129733..26d507e4 100755 --- a/config/debian/cron.reboot +++ b/config/debian/cron.reboot @@ -18,6 +18,7 @@ # exit on errors set -e +set -o pipefail # make sure to only use defined variables set -u # ERR traps should be inherited from functions too. (And command diff --git a/config/debian/cron.unchecked b/config/debian/cron.unchecked index a534ba06..8dc3b1f0 100755 --- a/config/debian/cron.unchecked +++ b/config/debian/cron.unchecked @@ -18,6 +18,7 @@ # exit on errors set -e +set -o pipefail # make sure to only use defined variables set -u # ERR traps should be inherited from functions too. (And command diff --git a/config/debian/cron.weekly b/config/debian/cron.weekly index b75539ed..52e95eb5 100755 --- a/config/debian/cron.weekly +++ b/config/debian/cron.weekly @@ -3,6 +3,7 @@ # Run once a week via cron, out of dak's crontab. set -e +set -o pipefail set -u # ERR traps should be inherited from functions too. (And command # substitutions and subshells and whatnot, but for us the functions is