summaryrefslogtreecommitdiffstats
path: root/etc/rc.shutdown
blob: 2f7bc6027f3f282ebbccb7639c0724101411f5ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/local/bin/php

# $Id$

exec("stty status '^T'");

# Set shell to ignore SIGINT (2), but not children;
# shell catches SIGQUIT (3) and returns to single user after fsck.
exec("trap : 2");
exec("trap : 3");

require("guiconfig.inc");

/* bring down carp gracefully */
$carp_counter=find_number_of_created_carp_interfaces();
mwexec("/sbin/sysctl net.inet.carp.allow=0");
for($x=0; $x<$carp_counter; $x++) {
        mwexec("/sbin/ifconfig carp{$x} down");
        mwexec("/sbin/ifconfig carp{$x} destroy");
}

exit 0;

OpenPOWER on IntegriCloud