version 1.5, 2004/10/11 15:00:51 |
version 1.6, 2009/09/05 16:26:07 |
|
|
# |
# |
|
|
# PROVIDE: downinterfaces |
# PROVIDE: downinterfaces |
# KEYWORD: shutdown |
# KEYWORD: nostart shutdown |
|
|
if [ "x$1" = "xstop" ]; then |
$_rc_subr_loaded . /etc/rc.subr |
|
|
. /etc/rc.conf |
name="downinterfaces" |
|
start_cmd=":" |
tmp=$(ifconfig -lu) |
stop_cmd="downinterfaces_stop" |
iflist="" |
|
for int in $tmp; do |
downinterfaces_stop() |
case $int in |
{ |
pppoe*) iflist="$iflist $int" |
tmp=$(ifconfig -lu) |
;; |
iflist="" |
esac |
for int in $tmp; do |
done |
case $int in |
iflist="$iflist $force_down_interfaces" |
pppoe*) iflist="$iflist $int" |
if [ "$iflist" != "" ] && [ "$iflist" != " " ] |
;; |
then |
esac |
|
|
echo "Shutting down interfaces:$iflist" |
|
for int in $iflist; do |
|
ifconfig $int down |
|
done |
done |
fi |
iflist="$iflist $force_down_interfaces" |
|
if [ "$iflist" != "" ] && [ "$iflist" != " " ] |
|
then |
|
|
|
echo "Shutting down interfaces:$iflist" |
|
for int in $iflist; do |
|
ifconfig $int down |
|
done |
|
fi |
|
} |
|
|
fi |
load_rc_config $name |
|
run_rc_command "$1" |