diff options
author | jim-p <jimp@pfsense.org> | 2011-01-12 14:23:39 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-01-12 14:26:35 -0500 |
commit | 7201ca277ed66540baea26ff26ea339ceb15ac9b (patch) | |
tree | a8f6f8bf2fb5be0e216fc9ccd5c624bd9fc619f2 /etc/rc.shutdown | |
parent | 311f93cd141d69536eb4fafa4e0068f6343252e3 (diff) | |
download | pfsense-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.shutdown')
-rwxr-xr-x | etc/rc.shutdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.shutdown b/etc/rc.shutdown index 257a577..9d46ad2 100755 --- a/etc/rc.shutdown +++ b/etc/rc.shutdown @@ -1,7 +1,7 @@ #!/bin/sh -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 shutdown at this moment, a config write operation is in progress and 30 seconds have passed." exit -1 fi |