help with custom fdi file/hal access

Maciej Grela maciej.grela at gmail.com
Wed Feb 25 07:33:05 PST 2009


2009/2/23 phil <happyharrysco1 at yahoo.co.uk>:
> hi there, on fedora10 with hal 0.5.12-14 i'm trying to get some
> powersaving settings changed when the psu is connected/disconnected to
> my acer aspire one laptop. i have written the script that sets these
> powersaving options and i have saved it in
> /usr/lib/hal/scripts/hal-aao-powertweaks then i created the file
> /etc/hal/fdi/policy/30-aaopowertweaks.fdi with the contents
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <deviceinfo version="0.2">
>  <device>
>   <match key="ac_adaptor.present" bool="true">
>    <append key="info.callouts.add"
> type="strlist">/usr/lib/hal/scripts/hal-aao-powertweaks</append>
>   </match>
>  </device>
>
> <device>
>   <match key="ac_adaptor.present" bool="false">
>    <append key="info.callouts.remove"
> type="strlist">/usr/lib/hal/scripts/hal-aao-powertweaks</append>
>   </match>
>  </device>
> </deviceinfo>
>
> and re-booted but it doesn't work. can anyone point a relative linux
> newb in the right direction to get this working
>

Hal fdi policy files don't work in the way you seem to be thinking.
You need to hook your scripts into acpid not hal. See the scripts
already present in /etc/acpi and integrate your stuff in a similar
way.

Best regards,
Maciej Grela


More information about the hal mailing list