Home | History | Annotate | Line # | Download | only in rc.d
downinterfaces revision 1.3
      1 #!/bin/sh
      2 #
      3 # $NetBSD: downinterfaces,v 1.3 2002/04/18 07:33:42 lukem Exp $
      4 #
      5 
      6 # PROVIDE: downinterfaces
      7 # KEYWORD: shutdown
      8 
      9 if [ "x$1" != "xstop" ]; then exit 0; fi
     10 
     11 . /etc/rc.conf
     12 
     13 tmp=`ifconfig -lu`
     14 iflist=""
     15 for int in $tmp; do
     16 	case $int in
     17 	pppoe*)	iflist="$iflist $int"
     18 		;;
     19 	esac
     20 done
     21 iflist="$iflist $force_down_interfaces"
     22 if [ "$iflist" = "" ] || [ "$iflist" = " " ]; then exit 0; fi
     23 
     24 echo "Shutting down interfaces:$iflist"
     25 for int in $iflist; do
     26 	ifconfig $int down
     27 done
     28