summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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