Search the list of up interfaces provided by "ifconfig -ul" instead of

greping for UP in "ifconfig $ifn".  This eliminates a dependancy on
/usr.
This commit is contained in:
brooks 2006-09-20 19:45:30 +00:00
parent 81cdbc19d7
commit 6e1b63c897

View File

@ -69,11 +69,13 @@ pccard_ether_start()
{
ifexists $ifn || exit 1
if [ -z "$rc_force" -a -x /usr/bin/grep ]; then
if ifconfig $ifn | grep -s '[<,]UP[,>]' > /dev/null 2>&1; then
# Interface is already up, so ignore it.
exit 0
fi
if [ -z "$rc_force" ]; then
for uif in `ifconfig -ul`; do
if [ "${uif}" = "${ifn}" ]; then
# Interface is already up, so ignore it.
exit 0
fi
done
fi
/etc/rc.d/netif start $ifn