Re: ipw srcipts for hal
- From: yelo_3 <yelo_3 yahoo it>
- To: Dan Williams <dcbw redhat com>, dragoran <drago01 gmail com>
- Cc: network manager <networkmanager-list gnome org>
- Subject: Re: ipw srcipts for hal
- Date: Mon, 25 Jun 2007 12:28:09 +0000 (GMT)
> I think the scripts will provide multiple killswitches, one for each ipw
> device found. And once ipwWirelessCtl uses the UDI that's passed to it,
> it should work fine with multiple killswitches.
So the work with the UDI might be done in the shell script hal-system-killswitch-?et-power, so that ipwWirelessCtl is invoked with the device name to shut down!
this could be done through info.parent as in the C code by dragoran, but in bash
> What other tools like NetworkManager do is another question; right now
> NM will kill _all_ radios when it detects one that's killed. I don't
> see any reason to change that right now. If the laptop actually has a
> physical killswitch, it certainly doesn't have more than one for wifi
> specifically, so I'm not sure we care about support multiple independent
> wifi killswitches in NM right now.
>
> Dan
This is, in my opinion, good for now.
I might have done an error in the setrkfill code portion in hal-system-killswitch-set-power-linux:
I think that the variable "$value" is passed by someone to the script, since it is used in the first lines, but I don't know if value=1 means rfkill=1 or rfkill=0...
___________________________________
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail:
http://it.docs.yahoo.com/nowyoucan.html
--- hal-system-killswitch-get-power-linux.ORIG 2007-06-22 22:33:24.000000000 -0400
+++ hal-system-killswitch-get-power-linux 2007-06-22 23:13:39.000000000 -0400
@@ -47,6 +47,17 @@
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "dellWirelessCtl returned $value" >&2
fi
+ elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "ipw" ] && [ -x /usr/bin/ipwWirelessCtl ]; then
+ /usr/bin/ipwWirelessCtl getrfkill
+ value=$?
+ if [ "$value" = "0" ]; then
+ exit 1
+ elif [ "$value" = "1" ] || [ "$value" = "2" ] || [ "$value" = "3" ]; then
+ exit 0
+ else
+ echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+ echo "ipwWirelessCtl returned $value" >&2
+ fi
else
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "Access type not supported" >&2
--- hal-system-killswitch-set-power-linux.ORIG 2007-06-22 22:33:24.000000000 -0400
+++ hal-system-killswitch-set-power-linux 2007-06-22 23:13:39.000000000 -0400
@@ -47,6 +47,17 @@
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "dellWirelessCtl returned $value" >&2
fi
+ elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "ipw" ] && [ -x /usr/bin/ipwWirelessCtl ]; then
+ if [ "$value" = "true" ]; then
+ rf_value=1
+ elif [ "$value" = "false" ]; then
+ rf_value=0
+ fi
+
+ /usr/bin/ipwWirelessCtl setrfkill $rf_value
+ ret=$?
+ if [ "$ret" != "0" ]; then
+ echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+ echo "ipwWirelessCtl returned $value" >&2
+ fi
else
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "Access type not supported" >&2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]