X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcron.reboot;h=dc802dc2579ad368b9fce4ff9f766d1a90f6a456;hb=813801add25896afc4bd9839f5d1fe0c05eea465;hp=b3c0b09a6e46fe9e100079764d20bd14c9468870;hpb=f96dff8bac6b5d13eceb2bf1bbe59d5998a27cce;p=dak.git diff --git a/config/debian/cron.reboot b/config/debian/cron.reboot index b3c0b09a..dc802dc2 100755 --- a/config/debian/cron.reboot +++ b/config/debian/cron.reboot @@ -18,11 +18,21 @@ # 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 +# substitutions and subshells and whatnot, but for us the functions is +# the important part here) +set -E + +# We sleep a while here, as cron - and as such @reboot jobs like this +# one - are started pretty early during boot. With parts of the system +# still missing, most noticable for us is a not-yet-started postgres... +sleep 75 # import the general variable set. -export SCRIPTVARS=/srv/ftp.debian.org/dak/config/debian/vars +export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars . $SCRIPTVARS # common functions are "outsourced" @@ -35,7 +45,7 @@ DEBUG=0 PROGRAM="dinstall_reboot" # where do we want mails to go? For example log entries made with error() -if [ "x$(hostname -s)x" != "xriesx" ]; then +if [[ ${HOSTNAME} != franck ]]; then # Not our ftpmaster host MAILTO=${MAILTO:-"root"} else