NetBSD/etc/rc.d/downinterfaces

32 lines
478 B
Plaintext
Raw Normal View History

#!/bin/sh
#
2004-10-11 19:00:51 +04:00
# $NetBSD: downinterfaces,v 1.5 2004/10/11 15:00:51 christos Exp $
#
2002-04-18 11:33:42 +04:00
# PROVIDE: downinterfaces
# KEYWORD: shutdown
if [ "x$1" = "xstop" ]; then
. /etc/rc.conf
2004-10-11 19:00:51 +04:00
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
echo "Shutting down interfaces:$iflist"
for int in $iflist; do
ifconfig $int down
done
fi
fi