[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#203588: acpid: Shell script has nothing to do in /etc



On Sat, 2003-08-02 at 03:05, Pierre THIERRY wrote:

> Tags: patch
> 
You forgot to attach it :-)

> > I've edited it, and I'd bet I'm not the only one who has a
> > dog/cat/turtle/etc who keeps knocking the power button, resulting in a
> > change to scheduling a shutdown in 1 minutes time :)
> 
> I think a very good coded script should use a config file in /etc. But
> maybe it's a purist opinion... What do you think of the patch I
> porvide ? (I did not touch the dcop thing, as I don't understand it
> very well)
> 
Ah, more configuration...

Sit back and ask yourself, who's interested in what this script does?

Is it the average user?  Nope ... they're probably quite content with
the script exactly as it is.

It's the person who specially doesn't want their machine going down when
the power button is pushed.  You could add a configuration file, and
make this script all fancy reading it, but you're only going to ever
think of the needs of the average user who doesn't even care.

Event-handling from cardmgr, hotplug, usbmgr, acpid, apmd etc. are
really useful to be able to be customised by power users.

And precisely because it's power users doing the customisation, rather
than trying to second-guess what magic they want to do on the event, the
simplest and best form of configuration is a shell script -- that way
they can do whatever they want!

> And this script could even not be part of acpid, but maybe sysvinit, as
> it could be useful even without ACPI, just in replacement for halt, with
> more functionnalities. One could add something for Gnome, as IIRC, DCOP
> is part of KDE or Qt...
> 
You've assumed they want the power button to *be* a power button, it's
entirely likely that they might want it to (for example) switch the user
into single user mode instead.

Shell scripts run by event daemons are the power-user's configuration
files.  Leave them be.

Scott

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: