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

# $Id$

<?php

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