2001-09-04 22:09:13 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-04-18 11:33:42 +04:00
|
|
|
# $NetBSD: downinterfaces,v 1.3 2002/04/18 07:33:42 lukem Exp $
|
2001-09-04 22:09:13 +04:00
|
|
|
#
|
|
|
|
|
2002-04-18 11:33:42 +04:00
|
|
|
# PROVIDE: downinterfaces
|
2001-09-04 22:09:13 +04:00
|
|
|
# KEYWORD: shutdown
|
|
|
|
|
2001-09-05 00:40:40 +04:00
|
|
|
if [ "x$1" != "xstop" ]; then exit 0; fi
|
2001-09-04 22:09:13 +04:00
|
|
|
|
|
|
|
. /etc/rc.conf
|
|
|
|
|
|
|
|
tmp=`ifconfig -lu`
|
|
|
|
iflist=""
|
|
|
|
for int in $tmp; do
|
|
|
|
case $int in
|
|
|
|
pppoe*) iflist="$iflist $int"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
iflist="$iflist $force_down_interfaces"
|
|
|
|
if [ "$iflist" = "" ] || [ "$iflist" = " " ]; then exit 0; fi
|
|
|
|
|
|
|
|
echo "Shutting down interfaces:$iflist"
|
|
|
|
for int in $iflist; do
|
|
|
|
ifconfig $int down
|
|
|
|
done
|