1 |
0c48d845
|
Scott Ullrich
|
#!/bin/sh
|
2 |
5b237745
|
Scott Ullrich
|
|
3 |
6995b4fc
|
Scott Ullrich
|
if [ -f /var/run/config.lock ]; then
|
4 |
|
|
echo "Cannot reboot at this moment, a config write operation is in progress."
|
5 |
|
|
exit -1
|
6 |
|
|
fi
|
7 |
|
|
|
8 |
1640b429
|
Scott Ullrich
|
if [ -e /dev/ukbd0 ]; then
|
9 |
|
|
/usr/sbin/vidcontrol -s 2
|
10 |
|
|
fi
|
11 |
f51db33f
|
Scott Ullrich
|
|
12 |
92a5e926
|
Renato Botelho
|
product=`cat /etc/inc/globals.inc | grep product_name | cut -d'"' -f4`
|
13 |
1640b429
|
Scott Ullrich
|
|
14 |
153c8601
|
Scott Ullrich
|
echo
|
15 |
f51db33f
|
Scott Ullrich
|
echo "${product} is now shutting down ..."
|
16 |
153c8601
|
Scott Ullrich
|
echo
|
17 |
|
|
|
18 |
0c48d845
|
Scott Ullrich
|
stty status '^T'
|
19 |
5b237745
|
Scott Ullrich
|
|
20 |
|
|
# Set shell to ignore SIGINT (2), but not children;
|
21 |
0c48d845
|
Scott Ullrich
|
trap : 2
|
22 |
5b237745
|
Scott Ullrich
|
|
23 |
0c48d845
|
Scott Ullrich
|
HOME=/; export HOME
|
24 |
|
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
25 |
|
|
export PATH
|
26 |
5b237745
|
Scott Ullrich
|
|
27 |
99dc4c77
|
Scott Ullrich
|
# If PLATFORM is pfSense then remove
|
28 |
|
|
# temporary files on shutdown from /tmp/
|
29 |
|
|
PLATFORM=`cat /etc/platform`
|
30 |
|
|
if [ "$PLATFORM" = "pfSense" ]; then
|
31 |
|
|
rm -rf /tmp/*
|
32 |
acdd8ddf
|
Scott Ullrich
|
else
|
33 |
ef68d19c
|
jim-p
|
/etc/rc.backup_rrd.sh
|
34 |
6b5a20ab
|
jim-p
|
/etc/rc.backup_dhcpleases.sh
|
35 |
99dc4c77
|
Scott Ullrich
|
fi
|