summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-03-13 06:07:56 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-03-13 06:07:56 +0000
commit57b6661794bd342f9ea6bdc8010dea3e90b4fb96 (patch)
tree94b68a33df34ccd0bc74757c13d392a19762a1d8 /etc
parentcfbd6db429f4a562e3f4bfdb28b7c399252e3e92 (diff)
downloadpfsense-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-xetc/rc.halt5
-rwxr-xr-xetc/rc.reboot5
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
OpenPOWER on IntegriCloud