[BACK]Return to downinterfaces CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc / rc.d

Annotation of src/etc/rc.d/downinterfaces, Revision 1.5

1.1       martin      1: #!/bin/sh
                      2: #
1.5     ! christos    3: # $NetBSD: downinterfaces,v 1.4 2002/08/16 18:05:19 martin Exp $
1.1       martin      4: #
                      5:
1.3       lukem       6: # PROVIDE: downinterfaces
1.1       martin      7: # KEYWORD: shutdown
                      8:
1.4       martin      9: if [ "x$1" = "xstop" ]; then
1.1       martin     10:
                     11: . /etc/rc.conf
                     12:
1.5     ! christos   13: tmp=$(ifconfig -lu)
1.1       martin     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"
1.4       martin     22: if [ "$iflist" != "" ] && [ "$iflist" != " " ]
                     23: then
1.1       martin     24:
1.4       martin     25:        echo "Shutting down interfaces:$iflist"
                     26:        for int in $iflist; do
                     27:                ifconfig $int down
                     28:        done
                     29: fi
                     30:
                     31: fi

CVSweb <webmaster@jp.NetBSD.org>