1
|
#!/bin/sh
|
2
|
|
3
|
echo
|
4
|
echo "pfSense is now shutting down ..."
|
5
|
echo
|
6
|
|
7
|
stty status '^T'
|
8
|
|
9
|
# Set shell to ignore SIGINT (2), but not children;
|
10
|
trap : 2
|
11
|
|
12
|
HOME=/; export HOME
|
13
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
14
|
export PATH
|
15
|
|
16
|
CARPINTS=`/sbin/ifconfig | grep "carp[0-999]" | cut -d":" -f1`
|
17
|
if [ $CARPINTS -gt 0 ]; then
|
18
|
echo -n "Bringing CARP interfaces down: ["
|
19
|
for ci in `/sbin/ifconfig | grep "carp[0-999]" | cut -d":" -f1`; do
|
20
|
echo -n " "
|
21
|
echo -n $ci
|
22
|
/sbin/ifconfig $ci down
|
23
|
/sbin/ifconfig $ci destroy
|
24
|
done
|
25
|
echo " ]"
|
26
|
fi
|
27
|
echo
|
28
|
echo
|
29
|
|
30
|
# Call sshd and alert we're shutting down so it can sync
|
31
|
/etc/sshd stop
|
32
|
echo
|
33
|
echo
|