summaryrefslogtreecommitdiffstats
path: root/src/etc/rc.halt
blob: 94a676f527e35f1ced83d2b9fcad4cd6a342ae37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

# /etc/rc.halt

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

OpenPOWER on IntegriCloud