diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2006-09-20 19:45:30 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2006-09-20 19:45:30 +0000 |
commit | 0e409e4b42f7a41729aae46b295f4e9dc86c9325 (patch) | |
tree | 551f931d15bbe3aa2293c7a0760f78984785a835 /etc/pccard_ether | |
parent | 6dc4e81071bbd220654bafc0329101c70ba2457c (diff) | |
download | src-0e409e4b42f7a41729aae46b295f4e9dc86c9325.tar.gz src-0e409e4b42f7a41729aae46b295f4e9dc86c9325.zip |
Search the list of up interfaces provided by "ifconfig -ul" instead of
greping for UP in "ifconfig $ifn". This eliminates a dependancy on
/usr.
Notes
Notes:
svn path=/head/; revision=162480
Diffstat (limited to 'etc/pccard_ether')
-rwxr-xr-x | etc/pccard_ether | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/etc/pccard_ether b/etc/pccard_ether index d2a24fafe24b..355e188983ba 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 |