2001-09-04 22:09:13 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2004-10-11 19:00:51 +04:00
|
|
|
# $NetBSD: downinterfaces,v 1.5 2004/10/11 15:00:51 christos 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
|
|
|
|
|
2002-08-16 22:05:19 +04:00
|
|
|
if [ "x$1" = "xstop" ]; then
|
2001-09-04 22:09:13 +04:00
|
|
|
|
|
|
|
. /etc/rc.conf
|
|
|
|
|
2004-10-11 19:00:51 +04:00
|
|
|
tmp=$(ifconfig -lu)
|
2001-09-04 22:09:13 +04:00
|
|
|
iflist=""
|
|
|
|
for int in $tmp; do
|
|
|
|
case $int in
|
|
|
|
pppoe*) iflist="$iflist $int"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
iflist="$iflist $force_down_interfaces"
|
2002-08-16 22:05:19 +04:00
|
|
|
if [ "$iflist" != "" ] && [ "$iflist" != " " ]
|
|
|
|
then
|
2001-09-04 22:09:13 +04:00
|
|
|
|
2002-08-16 22:05:19 +04:00
|
|
|
echo "Shutting down interfaces:$iflist"
|
|
|
|
for int in $iflist; do
|
|
|
|
ifconfig $int down
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|