Fix acquire-reboot-lock molly-guard hook to actually keep the lock until shutdown
authorJulien Cristau <jcristau@debian.org>
Fri, 4 May 2018 15:05:14 +0000 (17:05 +0200)
committerJulien Cristau <jcristau@debian.org>
Fri, 4 May 2018 15:06:28 +0000 (17:06 +0200)
RT#6893

modules/debian_org/files/molly-guard/15-acquire-reboot-lock

index ebbac93..c97861b 100644 (file)
@@ -11,9 +11,8 @@ if ! flock --exclusive -w 0  3; then
 fi
 echo "Reboot lock acquired."
 
-ppid="$PPID"
 (
-       while kill -0 "$ppid" 2>/dev/null; do
+       while dsa-is-shutdown-scheduled; do
                sleep 1
        done
 ) &