netif (147088) | netif (147681) |
---|---|
1#!/bin/sh 2# 3# Copyright (c) 2003 The FreeBSD Project. All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions 7# are met: 8# 1. Redistributions of source code must retain the above copyright --- 8 unchanged lines hidden (view full) --- 17# IN NO EVENT SHALL THE PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, 18# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24# | 1#!/bin/sh 2# 3# Copyright (c) 2003 The FreeBSD Project. All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions 7# are met: 8# 1. Redistributions of source code must retain the above copyright --- 8 unchanged lines hidden (view full) --- 17# IN NO EVENT SHALL THE PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, 18# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24# |
25# $FreeBSD: head/etc/rc.d/netif 147088 2005-06-07 04:49:12Z brooks $ | 25# $FreeBSD: head/etc/rc.d/netif 147681 2005-06-30 04:46:21Z brooks $ |
26# 27 28# PROVIDE: netif 29# REQUIRE: atm1 ipfilter mountcritlocal pccard serial sppp sysctl 30# KEYWORD: nojail 31 32. /etc/rc.subr 33. /etc/network.subr --- 70 unchanged lines hidden (view full) --- 104 105 # Get a list of network interfaces. 106 _ifn_list="`list_net_interfaces`" 107 108 # Set the scope of the command (all interfaces or just one). 109 # 110 _cooked_list= 111 if [ -n "$_cmdifn" ]; then | 26# 27 28# PROVIDE: netif 29# REQUIRE: atm1 ipfilter mountcritlocal pccard serial sppp sysctl 30# KEYWORD: nojail 31 32. /etc/rc.subr 33. /etc/network.subr --- 70 unchanged lines hidden (view full) --- 104 105 # Get a list of network interfaces. 106 _ifn_list="`list_net_interfaces`" 107 108 # Set the scope of the command (all interfaces or just one). 109 # 110 _cooked_list= 111 if [ -n "$_cmdifn" ]; then |
112 for i in $_cmdifn ; do 113 eval _if=\"`expr "$_ifn_list" : ".*\(${i}\).*"`\" 114 if [ -z "$_if" ]; then 115 err 1 "No such network interface: $i" 116 fi 117 _cooked_list="$_cooked_list $_if" 118 done | 112 # Don't check that the interfaces exist. We need to run 113 # the down code even when the interface doesn't exist to 114 # kill off wpa_supplicant. 115 _cooked_list="$_cmdifn" |
119 else 120 _cooked_list="$_ifn_list" 121 fi 122 123 for ifn in ${_cooked_list}; do 124 if ${_func} ${ifn} ; then 125 eval showstat_$ifn=1 126 else --- 53 unchanged lines hidden --- | 116 else 117 _cooked_list="$_ifn_list" 118 fi 119 120 for ifn in ${_cooked_list}; do 121 if ${_func} ${ifn} ; then 122 eval showstat_$ifn=1 123 else --- 53 unchanged lines hidden --- |