Deleted Added
full compact
netif (147681) netif (149725)
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 147681 2005-06-30 04:46:21Z brooks $
25# $FreeBSD: head/etc/rc.d/netif 149725 2005-09-02 17:05:07Z 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

--- 12 unchanged lines hidden (view full) ---

46 #
47 _cmdifn=$*
48
49 if [ -z "$_cmdifn" ]; then
50 #
51 # We're operating as a general network start routine.
52 #
53
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

--- 12 unchanged lines hidden (view full) ---

46 #
47 _cmdifn=$*
48
49 if [ -z "$_cmdifn" ]; then
50 #
51 # We're operating as a general network start routine.
52 #
53
54 # disable SIGQUIT (Ctrl-c) when running at at startup
55 trap : 3
56
54 # Create cloned interfaces
55 clone_up
56
57 # Create IPv6<-->IPv4 tunnels
58 gif_up
59
60 # Rename interfaces.
61 ifnet_rename

--- 35 unchanged lines hidden (view full) ---

97
98 if [ -z "$1" ]; then
99 err 1 "network_common(): No function name specified."
100 else
101 _func="$1"
102 fi
103 [ -n "$2" ] && _verbose=yes
104
57 # Create cloned interfaces
58 clone_up
59
60 # Create IPv6<-->IPv4 tunnels
61 gif_up
62
63 # Rename interfaces.
64 ifnet_rename

--- 35 unchanged lines hidden (view full) ---

100
101 if [ -z "$1" ]; then
102 err 1 "network_common(): No function name specified."
103 else
104 _func="$1"
105 fi
106 [ -n "$2" ] && _verbose=yes
107
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 # 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"
116 else
108 # Set the scope of the command (all interfaces or just one).
109 #
110 _cooked_list=
111 if [ -n "$_cmdifn" ]; then
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"
116 else
117 _cooked_list="$_ifn_list"
117 _cooked_list="`list_net_interfaces`"
118 fi
119
120 for ifn in ${_cooked_list}; do
121 if ${_func} ${ifn} ; then
122 eval showstat_$ifn=1
123 else
124 _fail="$_fail $ifn"
125 fi

--- 51 unchanged lines hidden ---
118 fi
119
120 for ifn in ${_cooked_list}; do
121 if ${_func} ${ifn} ; then
122 eval showstat_$ifn=1
123 else
124 _fail="$_fail $ifn"
125 fi

--- 51 unchanged lines hidden ---