summaryrefslogtreecommitdiffstats
path: root/etc/rc.reboot
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-01-12 14:23:39 -0500
committerjim-p <jimp@pfsense.org>2011-01-12 14:26:35 -0500
commit7201ca277ed66540baea26ff26ea339ceb15ac9b (patch)
treea8f6f8bf2fb5be0e216fc9ccd5c624bd9fc619f2 /etc/rc.reboot
parent311f93cd141d69536eb4fafa4e0068f6343252e3 (diff)
downloadpfsense-7201ca277ed66540baea26ff26ea339ceb15ac9b.zip
pfsense-7201ca277ed66540baea26ff26ea339ceb15ac9b.tar.gz
We no longer use /var/run/config.lock - catch up to other progress. Also, use lockf to test if the config is locked now, with a 30 second timeout.
Diffstat (limited to 'etc/rc.reboot')
-rwxr-xr-xetc/rc.reboot6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/rc.reboot b/etc/rc.reboot
index 851f1a8..4bb28a1 100755
--- a/etc/rc.reboot
+++ b/etc/rc.reboot
@@ -2,9 +2,9 @@
# $Id$
-if [ -f /var/run/config.lock ]; then
- echo "Cannot reboot at this moment, a config write operation is in progress."
- exit -1
+if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then
+ echo "Cannot reboot at this moment, a config write operation is in progress, and 30 seconds have passed."
+ exit 1
fi
sleep 1
OpenPOWER on IntegriCloud