summaryrefslogtreecommitdiffstats
path: root/etc/pccard_ether
diff options
context:
space:
mode:
authorambrisko <ambrisko@FreeBSD.org>2004-01-25 19:52:16 +0000
committerambrisko <ambrisko@FreeBSD.org>2004-01-25 19:52:16 +0000
commitfe992d62dbc4b5606c681038c28400725e4a5345 (patch)
tree55ff4ce2b77f15230b70533c6c41dd8c1360fc2e /etc/pccard_ether
parent1166334a41aad701159fad8e762aec6fc56e0550 (diff)
downloadFreeBSD-src-fe992d62dbc4b5606c681038c28400725e4a5345.zip
FreeBSD-src-fe992d62dbc4b5606c681038c28400725e4a5345.tar.gz
- Existing code would ignore pccard_ether_delay when more then 9 seconds
- If there was an exiting dhclient running on the same interface as the new iface that left and returned then dhclient would be told to use the same interface twice. Dhclient would fail and exit after getting confused. Use "sort -u" on them to ensure no duplicates. This is a mostly a race condition on suspend and resume and how things happen to occur. - Check for netmask being set on an interface rather then up. An interface can be up but not configured. Reviewed by: mbr
Diffstat (limited to 'etc/pccard_ether')
-rwxr-xr-xetc/pccard_ether7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/pccard_ether b/etc/pccard_ether
index 6f16ef0..90f1164 100755
--- a/etc/pccard_ether
+++ b/etc/pccard_ether
@@ -85,14 +85,15 @@ start_dhcp() {
case ${pccard_ether_delay} in
[Nn][Oo])
;;
- [0-9])
+ [0-9]*)
sleep ${pccard_ether_delay}
;;
esac
[ -n "$dhcp_program" ] && dhclient_program="$dhcp_program"
[ -n "$dhcp_flags" ] && dhclient_flags="$dhcp_flags"
if [ -x "${dhclient_program}" ]; then
- ${dhclient_program} ${dhclient_flags} $_dhcplist ${interface}
+ interfaces=`echo $_dhcplist ${interface} | xargs -n 1 echo | sort -u `
+ ${dhclient_program} ${dhclient_flags} ${interfaces}
else
echo "${dhclient_program}: DHCP client software not available"
fi
@@ -138,7 +139,7 @@ esac
case ${startstop} in
[Ss][Tt][Aa][Rr][Tt] | '')
if [ -x /usr/bin/grep ]; then
- if ifconfig ${interface} | grep -s UP, > /dev/null 2>&1; then
+ if ifconfig ${interface} | grep -s netmask > /dev/null 2>&1; then
# Interface is already up, so ignore it.
exit 0
fi
OpenPOWER on IntegriCloud