[Pm-utils] pm-action
Peter Jones
pjones at redhat.com
Mon Jun 12 14:54:50 PDT 2006
On Sat, 2006-06-10 at 00:03 +0100, Richard Hughes wrote:
> Okay, currently we have pm-action that does both suspend and hibernate
> based on the link name.
>
> This breaks package based setups
Huh? How do you figure?
> (unless we do 2x ln -s in the spec
> file) which is a potential bug for each distro packaging pm-utils.
"make install" should be making the symlinks appropriately, why would
packages need to change anything at all?
> Currently the action is done based on the link name, which is inherently
> fragile in my opinion.
How so?
> Considering the pm-action file is only a few lines long:
>
> export LC_COLLATE=C
> . /etc/pm/functions
> [ -f /sys/power/disk ] || exit 1
> [ -f /sys/power/state ] || exit 1
> ACTION=$(basename "$0")
> ACTION=${ACTION#pm-}
> pm_main "$ACTION"
> exit $?
>
> I think it would be sane to install *two* files pm-suspend and
> pm-hibernate that just did:
[...]
Why? What advantage does it bring at all?
> which seems less fragile as it doesn't depend on the link name (as other
> distro's may want a different name linking to these scripts for
> compatibility) and is simpler and shorter.
Do you have an example of anybody who actually wants to do this?
--
Peter
More information about the Pm-utils
mailing list