summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/wlan-ng26-utils-svn/wlan
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-03-14 03:16:13 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-03-14 03:16:13 (GMT)
commitee26e87efd151e56a9eb8142fdec6d2e5d9c733c (patch)
treec2f787f41517e60e879fa14071e43104dc08a507 /abs/core-testing/wlan-ng26-utils-svn/wlan
parent1d374402a7edf5c8c3e3351641223998553e77c3 (diff)
downloadlinhes_pkgbuild-ee26e87efd151e56a9eb8142fdec6d2e5d9c733c.zip
linhes_pkgbuild-ee26e87efd151e56a9eb8142fdec6d2e5d9c733c.tar.gz
linhes_pkgbuild-ee26e87efd151e56a9eb8142fdec6d2e5d9c733c.tar.bz2
Rename wlan-ng26-utils to wlan-ng26-utils-svn
Diffstat (limited to 'abs/core-testing/wlan-ng26-utils-svn/wlan')
-rw-r--r--abs/core-testing/wlan-ng26-utils-svn/wlan68
1 files changed, 68 insertions, 0 deletions
diff --git a/abs/core-testing/wlan-ng26-utils-svn/wlan b/abs/core-testing/wlan-ng26-utils-svn/wlan
new file mode 100644
index 0000000..6b3252d
--- /dev/null
+++ b/abs/core-testing/wlan-ng26-utils-svn/wlan
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+if [ ! -f /etc/wlan/shared ] ; then
+ echo "/etc/wlan/shared not present"
+ exit 0
+fi
+
+. /etc/wlan/shared
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ # This will implicitly fire off wland via hotplug.
+ stat_busy "Starting WLAN Devices"
+ if ! $MODPROBE p80211; then
+ echo "Failed to load p80211.o."
+ exit 1
+ fi
+
+ # NOTE: We don't explicitly insmod the card driver here. The
+ # best thing to do is to specify an alias in /etc/modules.conf.
+
+ for DEVICE in $WLAN_DEVICES; do
+ $MODPROBE $DEVICE
+ # if we don't have hotplug.. do things the old-fashioned way.
+ if [ $HAS_HOTPLUG = 'n' ] ; then
+ wlan_bring_it_up $DEVICE
+ fi
+ done
+
+ # And hotplug will take care of the rest, namely device
+ # initialization and whatnot.
+
+ add_daemon wlan
+ stat_done
+
+ ;;
+
+ stop)
+ stat_busy "Shutting Down WLAN Devices"
+ # Do a reset on each device to make sure none of them are still
+ # trying to generate interrupts.
+ for DEVICE in $WLAN_DEVICES; do
+ wlan_disable $DEVICE
+ ifconfig $DEVICE down
+ $MODPROBE -r $DEVICE
+ done
+
+ # remove p80211, which will implictly kill wland.
+ $MODPROBE -r p80211
+
+ rm_daemon wlan
+ stat_done
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ EXITCODE=$?
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart}"
+ ;;
+
+esac
+exit 0