From: Peter Palfrader Date: Sat, 24 Oct 2009 18:29:58 +0000 (+0200) Subject: buildd-reboot: Only touch no-daemon-please if there is currently a buildd.pid. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dsa-metapackages.git;a=commitdiff_plain;h=f0d5b2ab28621ea2f853cbd97942e326fcb1670a;ds=inline buildd-reboot: Only touch no-daemon-please if there is currently a buildd.pid. --- diff --git a/buildd-reboot b/buildd-reboot index c454a40..237fb8b 100755 --- a/buildd-reboot +++ b/buildd-reboot @@ -100,13 +100,17 @@ if ! [ -d ~buildd ]; then fi if ! test -e ~buildd/NO-DAEMON-PLEASE; then - echo "Touching ~buildd/NO-DAEMON-PLEASE ~buildd/EXIT-DAEMON-PLEASE" - sudo -u buildd touch ~buildd/NO-DAEMON-PLEASE ~buildd/EXIT-DAEMON-PLEASE - sudo -u buildd sh -c 'echo delete-on-boot > ~buildd/NO-DAEMON-PLEASE' - sudo chgrp -v adm ~buildd/NO-DAEMON-PLEASE - - echo "Sending HUP to buildd" - sudo -u buildd kill -HUP `sudo cat ~buildd/build/buildd.pid` + if [ -e ~buildd/build/buildd.pid ] ; then + echo "Touching ~buildd/NO-DAEMON-PLEASE ~buildd/EXIT-DAEMON-PLEASE" + sudo -u buildd touch ~buildd/NO-DAEMON-PLEASE ~buildd/EXIT-DAEMON-PLEASE + sudo -u buildd sh -c 'echo delete-on-boot > ~buildd/NO-DAEMON-PLEASE' + sudo chgrp -v adm ~buildd/NO-DAEMON-PLEASE + + echo "Sending HUP to buildd" + sudo -u buildd kill -HUP `sudo cat ~buildd/build/buildd.pid` + else + echo "no-daemon-please does not exist, but there is no buildd.pid file either" + fi else echo "no-daemon-please already exists" fi diff --git a/debian/changelog b/debian/changelog index db9b088..461b973 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debian.org (27) stable; urgency=low + + * buildd-reboot: Only touch no-daemon-please if there is currently a + buildd.pid. + + -- Peter Palfrader Sat, 24 Oct 2009 20:29:32 +0200 + debian.org (26) stable; urgency=low * *sigh*