o redirect the grep to /dev/null

o use ifn rather than interface in rc.network
o merge into rc.d/network1

Approved by: (re blanket)
This commit is contained in:
Warner Losh 2002-12-12 09:31:10 +00:00
parent 7faa4ab461
commit c9e1bbfb91
4 changed files with 12 additions and 2 deletions

View File

@ -146,6 +146,11 @@ network_start()
dhcp_interfaces="" dhcp_interfaces=""
for ifn in ${network_interfaces}; do for ifn in ${network_interfaces}; do
if ifconfig ${ifn} | grep -s UP, > /dev/null 2>&1; then
# Interface is already up, so ignore it.
continue;
fi
if [ -r /etc/start_if.${ifn} ]; then if [ -r /etc/start_if.${ifn} ]; then
. /etc/start_if.${ifn} . /etc/start_if.${ifn}
eval showstat_$ifn=1 eval showstat_$ifn=1

View File

@ -65,7 +65,7 @@ esac
case ${startstop} in case ${startstop} in
[Ss][Tt][Aa][Rr][Tt] | '') [Ss][Tt][Aa][Rr][Tt] | '')
if ifconfig ${interface} | grep -s UP,; then if ifconfig ${interface} | grep -s UP, > /dev/null 2>&1; then
# Interface is already up, so ignore it. # Interface is already up, so ignore it.
exit 0 exit 0
fi fi

View File

@ -146,6 +146,11 @@ network_start()
dhcp_interfaces="" dhcp_interfaces=""
for ifn in ${network_interfaces}; do for ifn in ${network_interfaces}; do
if ifconfig ${ifn} | grep -s UP, > /dev/null 2>&1; then
# Interface is already up, so ignore it.
continue;
fi
if [ -r /etc/start_if.${ifn} ]; then if [ -r /etc/start_if.${ifn} ]; then
. /etc/start_if.${ifn} . /etc/start_if.${ifn}
eval showstat_$ifn=1 eval showstat_$ifn=1

View File

@ -209,7 +209,7 @@ network_pass1() {
dhcp_interfaces="" dhcp_interfaces=""
for ifn in ${network_interfaces}; do for ifn in ${network_interfaces}; do
if ifconfig ${interface} | grep -s UP,; then if ifconfig ${ifn} | grep -s UP, > /dev/null 2>&1; then
# Interface is already up, so ignore it. # Interface is already up, so ignore it.
continue; continue;
fi fi