--- /dev/null
+#!/bin/bash
+
+# Copyright 2012 Peter Palfrader
+
+l=/var/run/reboot-lock
+exec 3> $l
+
+if ! flock --exclusive -w 0 3; then
+ echo 2>&1 "Cannot acquire reboot lock."
+ exit 1
+fi
+echo "Reboot lock acquired."
+
+ppid="$PPID"
+(
+ while kill -0 "$ppid" 2>/dev/null; do
+ sleep 1
+ done
+) &
+disown
+exit 0
"less": ensure => installed;
"lsb-release": ensure => installed;
"libfilesystem-ruby1.8": ensure => installed;
+ "molly-guard": ensure => installed;
"mtr-tiny": ensure => installed;
"nload": ensure => installed;
"pciutils": ensure => installed;
source => "puppet:///modules/debian-org/rc.local",
notify => Exec["rc.local start"],
;
+ "/etc/molly-guard/run.d/15-acquire-reboot-lock":
+ mode => 0755,
+ source => "puppet:///modules/debian-org/molly-guard-acquire-reboot-lock",
+ require => Package["molly-guard"],
+ ;
"/etc/dsa":
mode => 0755,