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/wlan/wlan-udev.sh | |
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/wlan/wlan-udev.sh')
-rw-r--r-- | abs/core-testing/wlan-ng26-utils-svn/tmp/trunk/etc/wlan/wlan-udev.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/abs/core-testing/wlan-ng26-utils-svn/tmp/trunk/etc/wlan/wlan-udev.sh b/abs/core-testing/wlan-ng26-utils-svn/tmp/trunk/etc/wlan/wlan-udev.sh new file mode 100644 index 0000000..879dd14 --- /dev/null +++ b/abs/core-testing/wlan-ng26-utils-svn/tmp/trunk/etc/wlan/wlan-udev.sh @@ -0,0 +1,46 @@ +#! /bin/bash + + +# script to start prism2 wlan for fedora FC5 udev +#udev rule +#ACTION=="add",BUS=="usb",DRIVER=="prism2_usb",RUN+="/etc/wlan/wlan-udev.sh %k" + +# 01-01-2007 (rsk) add check for wlan_wext_write +# 31-01-2007 (rsk) get the check right this time :) + +WEXT_PARAM=/sys/module/p80211/parameters/wlan_wext_write + +DEVICE=$1 +WLAN_UDEV=1 + +. /etc/wlan/shared + +if [ -f $WEXT_PARAM ]; then + WLAN_WEXT=`cat $WEXT_PARAM` +fi + +if [ $WLAN_WEXT = 1 ]; then + wlan_bring_it_up $DEVICE TRUE + # set encrypt on card not host + result=`$WLANCTL $DEVICE lnxreq_hostwep decrypt="false" encrypt="false"` + if [ $? != 0 ]; then + echo "Cannot enable wep $result" + exit 1 + fi +else + echo calling wlan_bring_it_up + wlan_bring_it_up $DEVICE + + if [ $? = 0 ] ; then + echo $DEVICE start OK + #allow time during boot to let other things start + #sleep 5 + /sbin/ifup $DEVICE + else + echo $DEVICE failed to come up! >&2 + exit 1 + fi +fi +exit 0 + + |