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

File: [cvs.NetBSD.org] / src / etc / rc.d / downinterfaces (download)

Revision 1.3, Thu Apr 18 07:33:42 2002 UTC (17 years, 6 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Changes since 1.2: +2 -1 lines

add a PROVIDE line

#!/bin/sh
#
# $NetBSD: downinterfaces,v 1.3 2002/04/18 07:33:42 lukem Exp $
#

# PROVIDE: downinterfaces
# KEYWORD: shutdown

if [ "x$1" != "xstop" ]; then exit 0; fi

. /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