summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2006-09-20 19:45:30 +0000
committerbrooks <brooks@FreeBSD.org>2006-09-20 19:45:30 +0000
commit6e1b63c8977158abbdba85b161b81f88960a59bb (patch)
tree551f931d15bbe3aa2293c7a0760f78984785a835 /etc
parent81cdbc19d7d89494d0822a05b5e7331310a0ded1 (diff)
downloadFreeBSD-src-6e1b63c8977158abbdba85b161b81f88960a59bb.zip
FreeBSD-src-6e1b63c8977158abbdba85b161b81f88960a59bb.tar.gz
Search the list of up interfaces provided by "ifconfig -ul" instead of
greping for UP in "ifconfig $ifn". This eliminates a dependancy on /usr.
Diffstat (limited to 'etc')
-rwxr-xr-xetc/pccard_ether12
1 files changed, 7 insertions, 5 deletions
diff --git a/etc/pccard_ether b/etc/pccard_ether
index d2a24fa..355e188 100755
--- a/etc/pccard_ether
+++ b/etc/pccard_ether
@@ -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
OpenPOWER on IntegriCloud