summaryrefslogtreecommitdiffstats
path: root/etc/pccard_ether
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-12-11 23:30:34 +0000
committerimp <imp@FreeBSD.org>2002-12-11 23:30:34 +0000
commit1faabd6cbccaf0ab1ccecc74bcf0d54e1be3d4f0 (patch)
treee9c787e183b3e168a01de1d4e8e79ee97cefe3b9 /etc/pccard_ether
parentb3975bafdaaad110ba8e8daf8beea71e4b90a120 (diff)
downloadFreeBSD-src-1faabd6cbccaf0ab1ccecc74bcf0d54e1be3d4f0.zip
FreeBSD-src-1faabd6cbccaf0ab1ccecc74bcf0d54e1be3d4f0.tar.gz
o Don't do anything if the interface is already up.
o Only delay in pccard_ether when we're doing dhcp and starting the interface. Approved: (re blanket for devd)
Diffstat (limited to 'etc/pccard_ether')
-rwxr-xr-xetc/pccard_ether23
1 files changed, 12 insertions, 11 deletions
diff --git a/etc/pccard_ether b/etc/pccard_ether
index f6a0e61..93c7ca5 100755
--- a/etc/pccard_ether
+++ b/etc/pccard_ether
@@ -21,6 +21,13 @@ stop_dhcp() {
start_dhcp() {
stop_dhcp
+ case ${pccard_ether_delay} in
+ [Nn][Oo])
+ ;;
+ [0-9])
+ sleep ${pccard_ether_delay}
+ ;;
+ esac
if [ -x "${dhcp_program}" ]; then
if [ `basename ${dhcp_program}` = "dhclient" ]; then
pidfile="/var/run/dhclient.${interface}.pid"
@@ -46,17 +53,6 @@ shift
startstop=$1
shift
-case ${pccard_ether_delay} in
-[Nn][Oo])
- ;;
-[0-9])
- sleep ${pccard_ether_delay}
- ;;
-*) # Default until it has had a chance to make it to /etc/defaults/rc.conf
- sleep 5
- ;;
-esac
-
case ${pccard_ifconfig} in
[Nn][Oo] | '')
expr "${removable_interfaces}" : ".*${interface}" > /dev/null || exit 0
@@ -69,6 +65,11 @@ esac
case ${startstop} in
[Ss][Tt][Aa][Rr][Tt] | '')
+ if ifconfig ${interface} | grep -s UP,; then
+ # Interface is already up, so ignore it.
+ exit 0
+ fi
+
if [ -r /etc/start_if.${interface} ]; then
. /etc/start_if.${interface}
fi
OpenPOWER on IntegriCloud