[laptop-mode] Making install.sh more distribution independent
Alon Bar-Lev
alon.barlev at gmail.com
Mon Jul 14 06:31:26 CEST 2008
Hello,
Thank you for your response.
On 7/14/08, Bart Samwel <bart at samwel.tk> wrote:
> Hi Alon,
>
>
> Alon Bar-Lev wrote:
> > Can you please consider making the script more distribution independent?
>
>
> Sure, I can do that. For Debian I kind of copied everything, but it
> would be nice if other distros could simply call install.sh.
>
Great!
>
> > For example:
> >
> > a) support DESTDIR
> >
> > DESTDIR=/tmp/temp-root ./install.sh
> >
> > This will install all required files into $DESTDIR so that package management can
> > commit the files.
>
>
> Sounds like a good idea. I can do that.
>
>
> > b) Do not handle init.d
> >
> > INIT_D="skip" ./install.sh
> >
> > This will not modify the init.d script, so that distribution specific init.d script may be used.
>
>
> OK, sounds very acceptable too.
>
>
> > c) Manual selection of acpi/apm support.
> >
> > ACPI="no" APM="auto" ./install.sh
>
>
> Hmmm, can you explain the use of this for package managers? I'd expect
> that you would want to be able to enable *everything*:
>
> FORCE_ALL_POWERMGMT_TYPES=1 ./install.sh
>
> so that you as a package writer have all files at your disposal below
> $DESTDIR, installed in the correct locations. And then you yourself can
> install only the subtrees intended for the power management daemon that
> you want. Or not?
This means that one need to know which files belongs to which daemon.
Best if you, as author, decide which goes where and when.
For example, if one installs from source, the package management knows
what the user want to install, and it should be able not to "auto
detect" the environment if it likes.
This why I separated the two types.
To force both:
ACPI="yes" APM="yes" ./install.sh
To enable one:
ACPI="yes" APM="no" ./install.sh
Current behavior:
ACPI="auto" APM="auto" ./install.sh
Thanks!
Alon.
More information about the laptop-mode
mailing list