aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2005-10-06 17:00:31 +0000
committerJudd Vinet <judd@archlinux.org>2005-10-06 17:00:31 +0000
commit14886e1bf20897e2efbc677d6bd1846db0201cbb (patch)
tree736ae6f64a027524f03fdc4a740718fdff738ba6
parent79142a38d91eaf27a6c677e0a6511f855e57e30d (diff)
downloadinitscripts-14886e1bf20897e2efbc677d6bd1846db0201cbb.tar.xz
added WIFI_WAIT parameter (no rebuild yet)
-rwxr-xr-xnetcfg3
-rw-r--r--profile-template2
2 files changed, 4 insertions, 1 deletions
diff --git a/netcfg b/netcfg
index 4de5052..bfc2532 100755
--- a/netcfg
+++ b/netcfg
@@ -88,7 +88,7 @@ start_profile()
stat_busy "Starting network profile: $1"
# Re-read the profile (stop_profile might have overwritten our settings)
- unset DESCRIPTION INTERFACE IFOPTS IWOPTS WIFI_INTERFACE
+ unset DESCRIPTION INTERFACE IFOPTS IWOPTS WIFI_INTERFACE WIFI_WAIT
unset GATEWAY HOSTNAME DOMAIN DNS1 DNS2
. $PROFILE_DIR/$1
@@ -97,6 +97,7 @@ start_profile()
if [ "$IWOPTS" ]; then
iwconfig $WIFI_INTERFACE $IWOPTS
[ $? -ne 0 ] && stat_fail && return
+ [ "$WIFI_WAIT" ] && sleep $WIFI_WAIT
fi
if [ "$IFOPTS" = "dhcp" -o "$IFOPTS" = "DHCP" ]; then
diff --git a/profile-template b/profile-template
index 70d2d7f..eabbd02 100644
--- a/profile-template
+++ b/profile-template
@@ -25,3 +25,5 @@ DNS2=
#WIFI_INTERFACE=wlan0 # use this if you have a special wireless interface
# that is linked to the real $INTERFACE
+#WIFI_WAIT=5 # seconds to wait for the wireless card to
+ # associate before bringing the interface up