From 57b6661794bd342f9ea6bdc8010dea3e90b4fb96 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 13 Mar 2006 06:07:56 +0000 Subject: Do not reboot or halt if a config_write() operation is in progress --- etc/rc.halt | 5 +++++ etc/rc.reboot | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'etc') 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 -- cgit v1.1