chiark / gitweb /
buildd-reboot: Only touch no-daemon-please if there is currently a buildd.pid.
authorPeter Palfrader <peter@palfrader.org>
Sat, 24 Oct 2009 18:29:58 +0000 (20:29 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 24 Oct 2009 18:29:58 +0000 (20:29 +0200)
buildd-reboot
debian/changelog

index c454a400b69fe31fc6799c313e245d96ee3b7a5c..237fb8b8b0e38304872e629501a532f121ae295a 100755 (executable)
@@ -100,13 +100,17 @@ if ! [ -d ~buildd ]; then
 fi
 
 if ! test -e ~buildd/NO-DAEMON-PLEASE; 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
 else
        echo "no-daemon-please already exists"
 fi
index db9b0885da24b53d50345f12d9a50c482528f82c..461b973f233f06c558635dca4a2b14c04bac37db 100644 (file)
@@ -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 <weasel@debian.org>  Sat, 24 Oct 2009 20:29:32 +0200
+
 debian.org (26) stable; urgency=low
 
   * *sigh*
 debian.org (26) stable; urgency=low
 
   * *sigh*