summaryrefslogtreecommitdiffstats
path: root/etc/rc.halt
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.halt
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.halt')
-rwxr-xr-xetc/rc.halt4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.halt b/etc/rc.halt
index 4f3d1ef..fd6318b 100755
--- a/etc/rc.halt
+++ b/etc/rc.halt
@@ -2,8 +2,8 @@
# $Id$
-if [ -f /var/run/config.lock ]; then
- echo "Cannot reboot at this moment, a config write operation is in progress."
+if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then
+ echo "Cannot halt at this moment, a config write operation is in progress and 30 seconds have passed."
exit -1
fi
OpenPOWER on IntegriCloud