[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.4, Fri Aug 16 18:05:19 2002 UTC (17 years, 2 months ago) by martin
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, fvdl_fs64_base
Changes since 1.3: +11 -7 lines

Avoid exit(0) to play more nicely with rc_fast_and_loose.
Noted by Greywolf on tech-userlevel.

#!/bin/sh
#
# $NetBSD: downinterfaces,v 1.4 2002/08/16 18:05:19 martin Exp $
#

# PROVIDE: downinterfaces
# KEYWORD: shutdown

if [ "x$1" = "xstop" ]; then

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

	echo "Shutting down interfaces:$iflist"
	for int in $iflist; do
		ifconfig $int down
	done
fi

fi