diff options
author | James Meyer <james.meyer@operamail.com> | 2009-03-14 03:16:13 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-03-14 03:16:13 (GMT) |
commit | ee26e87efd151e56a9eb8142fdec6d2e5d9c733c (patch) | |
tree | c2f787f41517e60e879fa14071e43104dc08a507 /abs/core-testing/wlan-ng26-utils-svn/tmp/trunk/etc/.svn/text-base/wlan.agent.svn-base | |
parent | 1d374402a7edf5c8c3e3351641223998553e77c3 (diff) | |
download | linhes_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/tmp/trunk/etc/.svn/text-base/wlan.agent.svn-base')
-rw-r--r-- | abs/core-testing/wlan-ng26-utils-svn/tmp/trunk/etc/.svn/text-base/wlan.agent.svn-base | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/abs/core-testing/wlan-ng26-utils-svn/tmp/trunk/etc/.svn/text-base/wlan.agent.svn-base b/abs/core-testing/wlan-ng26-utils-svn/tmp/trunk/etc/.svn/text-base/wlan.agent.svn-base new file mode 100644 index 0000000..7cf800a --- /dev/null +++ b/abs/core-testing/wlan-ng26-utils-svn/tmp/trunk/etc/.svn/text-base/wlan.agent.svn-base @@ -0,0 +1,78 @@ +#!/bin/bash +# +# p80211/wlan hotplug policy agent. +# +# wlan hotplug params include: +# +# ACTION=%s [register|remove|shutdown|startup|suspend|resume] +# INTERFACE=%s +# NSDNAME=%s +# + +cd /etc/hotplug +. hotplug.functions + +#DEBUG=yes export DEBUG + +if [ "$INTERFACE" = "" ]; then + mesg Bad WLAN invocation: \$INTERFACE is not set + exit 1 +fi + +if [ "$NSDNAME" = "" ]; then + mesg Bad WLAN invocation: \$NSDNAME is not set + exit 1 +fi + +debug_mesg WLAN $ACTION on $INTERFACE \($NSDNAME\) + +if [ "$NSDNAME" = "prism2_cs" ] ; then + mesg "WLAN Hotplug bypassed for pcmcia" + exit 0 +fi + +# load up the shared scripts +if [ ! -f /etc/wlan/shared ] ; then + mesg "/etc/wlan/shared not present, aborting" + exit 1 +fi + +ECHO=mesg +. /etc/wlan/shared + +case $ACTION in +'register'|'resume') + debug_mesg WLAN $INTERFACE registered. + wlan_bring_it_up $INTERFACE $WLAN_WEXT + if [ $? = 0 ] ; then + mesg WLAN $INTERFACE brought up successfully. + if [ -x /etc/wlan/pre-ifup ] ; then + # pre-ifup is presumed to call ifup if it + # wants to...it may choose to skip it. + mesg "WLAN bringing up layer 3+ with /etc/wlan/pre-ifup" + /etc/wlan/pre-ifup $INTERFACE + else + mesg "WLAN bringing up layer 3+ with /sbin/ifup" + /sbin/ifdown $INTERFACE + /sbin/ifup $INTERFACE + fi + else + mesg WLAN Could not bring up $INTERFACE + fi + # eventually invoke net.agent on $INTERFACE w/ REGISTER +;; +'remove'|'suspend') + debug_mesg WLAN $INTERFACE removed. +;; +'startup') + # kick off wland. + debug_mesg WLAN p80211 starting! +;; +'shutdown') + debug_mesg WLAN p80211 shutting down! +;; +*) + debug_mesg WLAN $ACTION event not supported + exit 1 ;; + +esac |