diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-03-13 06:07:56 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-03-13 06:07:56 +0000 |
commit | 57b6661794bd342f9ea6bdc8010dea3e90b4fb96 (patch) | |
tree | 94b68a33df34ccd0bc74757c13d392a19762a1d8 /etc | |
parent | cfbd6db429f4a562e3f4bfdb28b7c399252e3e92 (diff) | |
download | pfsense-57b6661794bd342f9ea6bdc8010dea3e90b4fb96.zip pfsense-57b6661794bd342f9ea6bdc8010dea3e90b4fb96.tar.gz |
Do not reboot or halt if a config_write() operation is in progress
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.halt | 5 | ||||
-rwxr-xr-x | etc/rc.reboot | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/etc/rc.halt b/etc/rc.halt index 1ed6ffe..4f3d1ef 100755 --- a/etc/rc.halt +++ b/etc/rc.halt @@ -2,6 +2,11 @@ # $Id$ +if [ -f /var/run/config.lock ]; then + echo "Cannot reboot at this moment, a config write operation is in progress." + exit -1 +fi + sleep 1 /sbin/shutdown -p now diff --git a/etc/rc.reboot b/etc/rc.reboot index 97f29e0..7a213e7 100755 --- a/etc/rc.reboot +++ b/etc/rc.reboot @@ -2,6 +2,11 @@ # $Id$ +if [ -f /var/run/config.lock ]; then + echo "Cannot reboot at this moment, a config write operation is in progress." + exit -1 +fi + sleep 1 /sbin/shutdown -r now |