aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Hovland <erik@hovland.org>2006-05-15 20:52:57 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-05-15 20:52:57 +0000
commitb6196c8aa108846ea57cdaa7a319f07d5eefbf5c (patch)
tree7cdbd6e1f14d93eb1fb3e1142f95b3c0cff6e762
parent77e6baf1d8c7266c032cec8c3226f50e1895a1ef (diff)
parentb9c8663043a0958875d4c38c61d3d33cb5ecc4a4 (diff)
downloadopenembedded-b6196c8aa108846ea57cdaa7a319f07d5eefbf5c.tar.gz
openembedded-b6196c8aa108846ea57cdaa7a319f07d5eefbf5c.tar.bz2
openembedded-b6196c8aa108846ea57cdaa7a319f07d5eefbf5c.zip
merge of 4571cb0f1a86cb9ef63d2235a8ece876e5fa6240
and 92cab509119c1daa124bc806a14a580163841dba
-rw-r--r--packages/wireless-tools/wireless-tools/zzz-wireless.if-pre-up34
-rw-r--r--packages/wireless-tools/wireless-tools_28-pre13.bb6
2 files changed, 38 insertions, 2 deletions
diff --git a/packages/wireless-tools/wireless-tools/zzz-wireless.if-pre-up b/packages/wireless-tools/wireless-tools/zzz-wireless.if-pre-up
new file mode 100644
index 0000000000..4c8e95bf2a
--- /dev/null
+++ b/packages/wireless-tools/wireless-tools/zzz-wireless.if-pre-up
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# /etc/network/if-pre-up.d/zzz-wireless
+# by Stefan Tomanek (stefan@pico.ruhr.de)
+
+
+IWCONFIG=/sbin/iwconfig
+IFCONFIG=/sbin/ifconfig
+GREP=/bin/grep
+LOGGER=/usr/bin/logger
+SLEEP=/bin/sleep
+
+# How long do we wait for association?
+RETRIES=15
+SLEEPTIME=1
+
+# Only sleep if we use DHCP (add others methods seperated by spaces)
+ONLY_FOR="static dhcp"
+
+if [ -z "$IF_WIRELESS_TYPE" ] && echo "$ONLY_FOR" | grep -q "$METHOD" ; then
+ $IFCONFIG $IFACE up
+ $LOGGER Checking for WLAN association...
+ while ( [ $RETRIES -gt 0 ] && ($IWCONFIG "$IFACE" | $GREP -q "Access Point: Not-Associated") ); do
+ $LOGGER No association yet, $RETRIES retries until timeout
+ RETRIES=$(($RETRIES-1))
+ $SLEEP $SLEEPTIME
+ done
+
+ if [ $RETRIES -eq 0 ]; then
+ $LOGGER Timeout waiting for association, continuing anyway...
+ else
+ $LOGGER Found association!
+ fi
+fi
diff --git a/packages/wireless-tools/wireless-tools_28-pre13.bb b/packages/wireless-tools/wireless-tools_28-pre13.bb
index 0888646d36..c961a25f83 100644
--- a/packages/wireless-tools/wireless-tools_28-pre13.bb
+++ b/packages/wireless-tools/wireless-tools_28-pre13.bb
@@ -4,11 +4,12 @@ SECTION = "base"
PRIORITY = "optional"
MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
LICENSE = "GPL"
-PR = "r0"
+PR = "r1"
SRC_URI = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.28.pre13.tar.gz \
file://man.patch;patch=1 \
- file://wireless-tools.if-pre-up"
+ file://wireless-tools.if-pre-up \
+ file://zzz-wireless.if-pre-up"
S = "${WORKDIR}/wireless_tools.28"
CFLAGS =+ "-I${S}"
@@ -32,6 +33,7 @@ do_install() {
oe_runmake PREFIX=${D} install-iwmulticall install-dynamic
install -d ${D}${sysconfdir}/network/if-pre-up.d
install ${WORKDIR}/wireless-tools.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/wireless-tools
+ install ${WORKDIR}/zzz-wireless.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/zzz-wireless
}
PACKAGES = "libiw libiw-dev libiw-doc ${PN} ${PN}-doc"