[Debian-eeepc-devel] [eeepc-acpi-scripts PATCH] rfkill bits for use with kernel 2.6.28

Daniel Moerner dmoerner at gmail.com
Sun Dec 28 19:45:47 UTC 2008


On Sun, Dec 28, 2008 at 9:01 AM, walter <vedawalter at gmail.com> wrote:
> a fast & dirty fix (tested on 701):
> 00000010)
> detect_rfkill eeepc-wlan
> if [ $(cat $RFKILL) = "0" ]; then
> /etc/acpi/actions/wireless.sh on
> else
> /etc/acpi/actions/wireless.sh off
> fi
> show_wireless
> ;;
>

Thanks for the hint.  Your way probably works with older kernels (if
there isn't an RFKILL the test fails so it defaults to the normal
behavior), but I didn't care about that to get the fix working, so I
implemented it a bit differently so as to be consistent with
show_wireless:

0000010)
    detect_wlan
    if grep -q $WLAN_IF /proc/net/wireless; then
        /etc/acpi/actions/wireless.sh off
    else
        /etc/acpi/actions/wireless.sh on
    fi
    show_wireless
    ;;

Your solution is more portable, and it seems like a candidate for
inclusion in the package since it would fix the problem with 2.6.28.
It works on my 901.  However, I must admit that I don't quite
understand why it works as it does. (My first try used [ "x$(cat
$RFKILL)" == "x0" ] which doesn't work; I don't know why the single
equals sign works or really what it's even testing.  But my sh is
limited.)

Daniel

-- 
Daniel Moerner <dmoerner at gmail.com>



More information about the Debian-eeepc-devel mailing list