]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/wlan-ng/files/post-down
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / wlan-ng / files / post-down
1 #!/bin/sh
2 #
3 # This script takes care of bringing down wlan-ng devices.
4 # It is run by ifdown.
5
6 WLANCTL=/sbin/wlanctl-ng
7
8 if [ ! -x $WLANCTL ] ; then 
9         exit 0
10 fi
11
12 case $IFACE in
13 wlan?)
14         # Reset device to make sure it is not trying to generate
15         # interrupts.
16         result=`$WLANCTL $IFACE lnxreq_ifstate ifstate=disable`
17
18         # Remove modules. Of course, for all I know they are still in use
19         # by another interface, in which case these rmmods will fail. Also,
20         # depending on how modutils is set up, different prism2 modules
21         # might be loaded.
22         (
23                 rmmod prism2_pci || rmmod prism2_cs || rmmod prism2_usb || \
24                         rmmod prism2_plx || true
25                 rmmod p80211 || true
26         ) 2>/dev/null
27         
28         # Remove lock file, just in case.
29         rm -f /var/lock/wlan-$IFACE.lock
30 ;;
31 esac