new hal policy file

View: New views
3 Messages — Rating Filter:   Alert me  

new hal policy file

by Andrew Telford :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have an APC usb UPS and the process 'hald-addon-hid-ups' was slowly growing and using up all my RAM (Gentoo stable x86).

I noted that the latest release 3.14.3 installs a new hal policy file so upgraded to in the hope that it would fix things. The policy file syntax was not accepted by hal. I got an error:

hald[12708]: error in fdi file /etc/hal/fdi/policy/80-apcupsd-ups-policy.fdi:5: Bad rule: unknown type_match

I had a quick scan of the hal documents, and it appears that the first "match" tag has incorrect syntax.  Here is my patch

5c5
<     <match key="info.addons" type="strlist">hald-addon-hid-ups</match>
---
>     <match key="info.addons" contains="hald-addon-hid-ups">

Does this make sense? In any case, the process 'hald-addon-hid-ups'  does not start anymore, so apcupsd has sole access to the UPS which is what I think was supposed to happen,

Andrew


      Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Apcupsd-users mailing list
Apcupsd-users@...
https://lists.sourceforge.net/lists/listinfo/apcupsd-users

Re: new hal policy file

by Adam Kropelin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Feb 6, 2008 2:53 PM, Andrew Telford <blaahmail@...> wrote:

> I have an APC usb UPS and the process 'hald-addon-hid-ups' was slowly growing and using up all my RAM (Gentoo stable x86).
>
> I noted that the latest release 3.14.3 installs a new hal policy file so upgraded to in the hope that it would fix things. The policy file syntax was not accepted by hal. I got an error:
>
> hald[12708]: error in fdi file /etc/hal/fdi/policy/80-apcupsd-ups-policy.fdi:5: Bad rule: unknown type_match
>
> I had a quick scan of the hal documents, and it appears that the first "match" tag has incorrect syntax.  Here is my patch
>
> 5c5
> <     <match key="info.addons" type="strlist">hald-addon-hid-ups</match>
> ---
> >     <match key="info.addons" contains="hald-addon-hid-ups">
>
> Does this make sense? In any case, the process 'hald-addon-hid-ups'  does not start anymore, so apcupsd has sole access to the UPS which is what I think was supposed to happen,

What version of hald are you running? Maybe they changed the syntax
for this. The original syntax is correct and tested on RHEL5.

--Adam

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Apcupsd-users mailing list
Apcupsd-users@...
https://lists.sourceforge.net/lists/listinfo/apcupsd-users

Parent Message unknown Re: new hal policy file

by Adam Kropelin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

(restoing apcupsd-users cc:)

Andrew Telford wrote:

> Hi,
>
> I have tried it on Gentoo with both hal 0.5.9.1-r3 (stable) and 0.5.10
> (unstable). In both cases the syntax error message goes away with my
> patch.
>
> With these versions a DTD file /usr/share/hal/fdi/fdi.dtd is
> installed - as you can see from the excerpt below, the "match"
> element has no "type" attribute.
> [...]
>
> See
> http://people.freedesktop.org/~david/hal-spec/hal-spec.html#fdi-matching
> for the current documentation,

Sure enough, the policy file is incorrect as you say. RHEL5 uses hal-0.5.8
which has the same DTD, so it's also "wrong" on that system as well.
Strangely, though, it works just fine. I retried it just to be sure.

Anyway, I will apply your fix for apcupd-3.14.4. Thanks!
--Adam


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Apcupsd-users mailing list
Apcupsd-users@...
https://lists.sourceforge.net/lists/listinfo/apcupsd-users