xref: /minix/etc/rc.d/downinterfaces (revision 9f81acbc)
1#!/bin/sh
2#
3# $NetBSD: downinterfaces,v 1.6 2009/09/05 16:26:07 apb Exp $
4#
5
6# PROVIDE: downinterfaces
7# KEYWORD: nostart shutdown
8
9$_rc_subr_loaded . /etc/rc.subr
10
11name="downinterfaces"
12start_cmd=":"
13stop_cmd="downinterfaces_stop"
14
15downinterfaces_stop()
16{
17	tmp=$(ifconfig -lu)
18	iflist=""
19	for int in $tmp; do
20		case $int in
21		pppoe*)	iflist="$iflist $int"
22			;;
23		esac
24	done
25	iflist="$iflist $force_down_interfaces"
26	if [ "$iflist" != "" ] && [ "$iflist" != " " ]
27	then
28
29		echo "Shutting down interfaces:$iflist"
30		for int in $iflist; do
31			ifconfig $int down
32		done
33	fi
34}
35
36load_rc_config $name
37run_rc_command "$1"
38