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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107774
4 changed files with 12 additions and 2 deletions

View File

@ -146,6 +146,11 @@ network_start()
dhcp_interfaces=""
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
. /etc/start_if.${ifn}
eval showstat_$ifn=1

View File

@ -65,7 +65,7 @@ esac
case ${startstop} in
[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.
exit 0
fi

View File

@ -146,6 +146,11 @@ network_start()
dhcp_interfaces=""
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
. /etc/start_if.${ifn}
eval showstat_$ifn=1

View File

@ -209,7 +209,7 @@ network_pass1() {
dhcp_interfaces=""
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.
continue;
fi