Project

General

Profile

Download (720 Bytes) Statistics
| Branch: | Tag: | Revision:
1
#!/bin/sh
2

    
3
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
if [ -e /dev/ukbd0 ]; then
9
        /usr/sbin/vidcontrol -s 2
10
fi
11
        
12
echo
13
echo "pfSense is now shutting down ..."
14
echo
15

    
16
stty status '^T'
17

    
18
# Set shell to ignore SIGINT (2), but not children;
19
trap : 2
20

    
21
HOME=/; export HOME
22
PATH=/sbin:/bin:/usr/sbin:/usr/bin
23
export PATH
24

    
25
# If PLATFORM is pfSense then remove
26
# temporary files on shutdown from /tmp/
27
PLATFORM=`cat /etc/platform`
28
if [ "$PLATFORM" = "pfSense" ]; then
29
	rm -rf /tmp/*
30
else
31
	/etc/rc.conf_mount_rw
32
	# Save the rrd databases to the config path.
33
	tar -czf /cf/conf/rrd.tgz -C / var/db/rrd/*.rrd
34
	/etc/rc.conf_mount_ro
35
fi
(61-61/73)