Project

General

Profile

Download (552 Bytes) Statistics
| Branch: | Tag: | Revision:
1 5b237745 Scott Ullrich
#!/bin/sh
2
3 1b8df11b Bill Marquette
# $Id$
4
5 7201ca27 jim-p
if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then
6
	echo "Cannot reboot at this moment, a config write operation is in progress, and 30 seconds have passed."
7
	exit 1
8 57b66617 Scott Ullrich
fi
9
10 5b237745 Scott Ullrich
sleep 1
11
12 f921cfbb Scott Ullrich
# If PLATFORM is pfSense then remove
13
# temporary files on shutdown from /tmp/
14
PLATFORM=`cat /etc/platform`
15
if [ "$PLATFORM" = "pfSense" ]; then
16
	rm -rf /tmp/*
17
else
18 ef68d19c jim-p
	/etc/rc.backup_rrd.sh
19 6b5a20ab jim-p
	/etc/rc.backup_dhcpleases.sh
20 f921cfbb Scott Ullrich
fi
21
22
sleep 1
23
24 bf072179 jim-p
SHUTDOWN=/sbin/shutdown
25
if [ -f /sbin/shutdown.old ]; then
26
	SHUTDOWN=/sbin/shutdown.old
27
fi
28
29
$SHUTDOWN -r now