On Thu, Oct 30, 2008 at 08:52:28PM +0100, Michael Biebl wrote:
> Why should the user have the need to edit/configure a script that is
> shipped by powersaved like wm_logout, beep_hi, beep_lo (this is true for
> all scripts that are shipped in /usr/lib/powersave/scripts).
> 
> I don't see any, besides that this
> a) offers a way for a user to screw up his installation
> b) increases the size of /etc
> c) makes it much harder for upgrades. conffiles are treated differently
> and not automatically removed e.g.
> 
> Can you provide a profound reason, why you have to edit one of those
> files that are shipped by powersaved?

As you may have noticed, in the original bug report I wrote:

"Any non-trivial configuration of powersaved requires _writing_ event
scripts. At the moment these scripts must be placed under
/usr/lib/powersave/scripts which violates Debian Policy." 

And that is indeed so, just open /etc/powersave/events and look what
is inside. You will see a lot of events that do not have a meaningful
handler shipped with powersaved. In my particular case I would like to
catch EVENT_ACADAPTER_ONLINE/EVENT_ACADAPTER_OFFLINE events to circumwent
some limitations of the hardware of my laptop (yes, I know that there
is acpid, etc. but I would like to keep my configuration as simple as
possible and in one place).

You might be right about the little need to edit the event scripts
currently shipped with the powersaved daemon, if they do their designated
work rightfully. For some reason you seem to be focused on _editing_ these
default scripts, but I am talking about general configurability of your package.
Currently, it goes against debian standards.

Now why I consider meaninful to place the scripts under /etc/.

1. The default scripts become also configurable. You wrote above that
this makes possible for a user to screw up his installation.
I do not think this is a serious argument. There are _lots_ of other
configurable files under /etc in debian that have a potential to screw up
the system in much more drastic ways. About the size:

# du -s /etc
19504   /etc
# du -s /usr/lib/powersave/scripts 
64      /usr/lib/powersave/scripts

That's about 0.3% increase in size on this laptop. Even when compared
only to the size of /etc that's negligible and you know that there
are other files on root.

Your only meaningful argument is about the difficulties with conffiles
on upgrades. But even looking at the extreme case of acpi-support
I do not see anything disastrous: its conffiles is 173 lines
long, and the postinst that does the most work on upgrades is only 47
lines.

2. Having all event scripts in one directory would eliminate the need
of patching powesaved. powersaved has -x and -y options. This means
that you could keep the scripts for the internal events in
/usr/lib/powersave and for the configurable events in any directory of
your choice. The required change is one-liner.

> As I wrote, there is some merit to your proposal when it comes to adding
> own additional scripts, which then could be placed under /etc, much like
> pm-utils does. But this is, as I wrote a feature request (powersaved
> providing a facility to execute custom scripts from /etc/).

No, it is not a new feature. If you put all configurable scripts under
/etc as I propose you will not have to change powersaved in any way. 

> Question is, if custom scripts are a real necessity. Nowadays powersaved
> uses hal/pm-utils for the actual suspend/hibernate, so you should
> actually use pm-utils if you want to run custom scripts on
> suspend/hibernate.

There are other events besides suspend/hibernate.

-- 
Stanislav



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to