diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-05-06 14:44:33 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-05-06 14:44:33 +0000 |
commit | 0c48d8454414955108f51c84830f03e70425bc88 (patch) | |
tree | 7f46f8931f0095f17f7e272aab58864707e466ad /etc/rc.shutdown | |
parent | 42013a429e8496431bf6ca58eb8e4a369921a291 (diff) | |
download | pfsense-0c48d8454414955108f51c84830f03e70425bc88.zip pfsense-0c48d8454414955108f51c84830f03e70425bc88.tar.gz |
Convert carp code back to shell script
Diffstat (limited to 'etc/rc.shutdown')
-rwxr-xr-x | etc/rc.shutdown | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/etc/rc.shutdown b/etc/rc.shutdown index 3137edb..e223114 100755 --- a/etc/rc.shutdown +++ b/etc/rc.shutdown @@ -1,28 +1,19 @@ -#!/usr/local/bin/php +#!/bin/sh -# $Id$ - -<?php - -exec("stty status '^T'"); +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"); +trap : 2 +trap : 3 # shouldn't be needed -/* 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++) { - echo "Bringing down CARP{$x} ..."; - mwexec("/sbin/ifconfig carp{$x} down"); - mwexec("/sbin/ifconfig carp{$x} destroy"); - echo " Done."; -} +HOME=/; export HOME +PATH=/sbin:/bin:/usr/sbin:/usr/bin +export PATH -exit 0; +for ci in `ifconfig | grep "carp[0-999]" | cut -d":" -f1`; do + echo Bringing $ci down ... + /sbin/ifconfig $ci down + /sbin/ifconfig $ci destroy +done -?>
\ No newline at end of file |