Created
March 20, 2012 08:52
-
-
Save 10sr/2133000 to your computer and use it in GitHub Desktop.
wicd before connecting reload wlan module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| WLINTERFACE="`cat /etc/wicd/manager-settings.conf | grep wireless_interface | sed 's/.*= //'`" | |
| if [ -e "/sys/class/net/$WLINTERFACE/device/driver" ] | |
| then | |
| WLDRIVER=`ls -l /sys/class/net/$WLINTERFACE/device/driver | sed 's#^.*/\([^/]*\)$#\1#'` # expect wl | |
| else | |
| WLDRIVER="" | |
| fi | |
| if [ "$WLDRIVER" != "" ] | |
| then | |
| modprobe -r $WLDRIVER | |
| modprobe $WLDRIVER | |
| # echo $WLDRIVER | |
| fi |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Acer Aspire One - ArchWikiから。
これを
/etc/wicd/scripts/preconnect/reload_driver.shとして実行権限を付加して保存。