Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 36 lines (28 sloc) 0.716 kb
0c48d84 Convert carp code back to shell script
Scott Ullrich authored
1 #!/bin/sh
5b23774 Initial revision
Scott Ullrich authored
2
6995b4f Do not allow shutdown if write is in progress
Scott Ullrich authored
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
1640b42 Switch back to vty1 on reboot/shutdown
Scott Ullrich authored
8 if [ -e /dev/ukbd0 ]; then
9 /usr/sbin/vidcontrol -s 2
10 fi
11
153c860 Output status of bringing carp interfaces down
Scott Ullrich authored
12 echo
13 echo "pfSense is now shutting down ..."
14 echo
15
0c48d84 Convert carp code back to shell script
Scott Ullrich authored
16 stty status '^T'
5b23774 Initial revision
Scott Ullrich authored
17
18 # Set shell to ignore SIGINT (2), but not children;
0c48d84 Convert carp code back to shell script
Scott Ullrich authored
19 trap : 2
5b23774 Initial revision
Scott Ullrich authored
20
0c48d84 Convert carp code back to shell script
Scott Ullrich authored
21 HOME=/; export HOME
22 PATH=/sbin:/bin:/usr/sbin:/usr/bin
23 export PATH
5b23774 Initial revision
Scott Ullrich authored
24
99dc4c7 Do not rm -rf /tmp on shutdown if platform is not pfSense
Scott Ullrich authored
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/*
acdd8dd MFC 11518
Scott Ullrich authored
30 else
83df670 MFC 11521
Scott Ullrich authored
31 /etc/rc.conf_mount_rw
acdd8dd MFC 11518
Scott Ullrich authored
32 # Save the rrd databases to the config path.
33 tar -czf /cf/conf/rrd.tgz /var/db/rrd/*.rrd
83df670 MFC 11521
Scott Ullrich authored
34 /etc/rc.conf_mount_ro
99dc4c7 Do not rm -rf /tmp on shutdown if platform is not pfSense
Scott Ullrich authored
35 fi
Something went wrong with that request. Please try again.