diff options
Diffstat (limited to 'src/etc/rc.halt')
-rwxr-xr-x | src/etc/rc.halt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/etc/rc.halt b/src/etc/rc.halt new file mode 100755 index 0000000..fd6318b --- /dev/null +++ b/src/etc/rc.halt @@ -0,0 +1,13 @@ +#!/bin/sh + +# $Id$ + +if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then + echo "Cannot halt at this moment, a config write operation is in progress and 30 seconds have passed." + exit -1 +fi + +sleep 1 + +/sbin/shutdown -p now + |