#585173 ifupdown: wkan rf killswitch doesnt trigger ifup/down

Package:
ifupdown
Source:
ifupdown
Description:
high level tools to configure network interfaces
Submitter:
Felix Salfelder
Date:
2010-06-09 19:18:05 UTC
Severity:
wishlist
#585173#5
Date:
2010-06-09 19:15:01 UTC
From:
To:
Hi

some wlan drivers trigger uevents, whenever the user presses/toggles the
rf killswitch. if would make perfect sense to hand this over to
ifup/down if this is wanted by the user.

i suggest putting a file, say 99-rfkill.rules, containing the following
lines (or similar) into /etc/udev/rules.d/.

ACTION=="change", \
ENV{RFKILL_TYPE}=="wlan", ENV{RFKILL_STATE}=="1",SUBSYSTEM=="rfkill", \
RUN+="/sbin/ifup --allow=rfkill wlan0"

ACTION=="change", \
ENV{RFKILL_TYPE}=="wlan", ENV{RFKILL_STATE}=="2",SUBSYSTEM=="rfkill", \
RUN+="/sbin/ifdown --allow=rfkill wlan0"

this reduces te configuation overhead of the end user to adding
"allow-rfkill wlan0" to her interface file, and doesnt do any harm to
someone who doesnt like it.

unfortunately, i am lacking a method to find the correct ifname (wlan0
here). i leave this open, since i dont have many rfkill switches to test
anyway. the proposed rules work with Intel N WiFi Link 5300 (iwlagn)

Thank you
felix