[laptop-mode] [PATCH] laptop-mode-tools-1.47 - install.sh fixups

Alon Bar-Lev alon.barlev at gmail.com
Sun Mar 1 07:33:08 CET 2009


So please fix the installation:
DESTDIR=/tmp/lm-test INIT_D=none ACPI=force APM=force PMU=disabled ./install

It should not fail and not install any of PMU stuff.

Thanks!

On Mon, Feb 23, 2009 at 1:58 PM, Bart Samwel <bart at samwel.tk> wrote:
> Hi Alon,
>
> Thanks for contributing! Unfortunately your patch is not correct:
> pm-utils has nothing to do with PMU. The PMU power management unit is
> the piece of hardware which manages power in older (PowerPC) Apple
> hardware. On the other hand, pm-utils is very new software which
> provides support for suspending and resuming and other power related
> stuff. Therefore, the configuration for pm-utils should definitely be
> installed always whenever pm-utils is present on the system!
>
> Cheers,
> Bart
>
> Alon Bar-Lev wrote:
>> Hello,
>>
>> Recent version did not check for proper configuration before installing files.
>>
>> I don't know if the patch bellow is correct, as I don'tuse pm-tools.
>>
>> But it should always check for APM/ACPI/PMU state before doing anything.
>>
>> It also should scan /etc if mode is "auto".
>>
>> Thanks!
>> Alon.
>>
>> ---
>>
>> --- laptop-mode-tools_1.47/install.sh 2009-01-26 21:45:20.000000000 +0200
>> +++ laptop-mode-tools_1.47.new/install.sh     2009-02-08 20:25:05.000000000 +0200
>> @@ -180,16 +180,6 @@ if ( ! $INSTALL -m 744 man/* "$DESTDIR/$
>>  fi
>>
>>
>> -# Install pm-utils hook only if pm-utils config dir is present, or force the
>> -# install if we have a DESTDIR.
>> -if [ -n "$DESTDIR" -o -d "$DESTDIR/etc/pm/sleep.d" ] ; then
>> -     if ( ! $INSTALL -m 755 etc/pm/sleep.d/99laptop-mode "$DESTDIR/etc/pm/sleep.d" ) ; then
>> -             echo "$0: Failed to install 99-laptop-mode into /etc/pm/sleep.d. Installation failed."
>> -             exit 36
>> -     fi
>> -fi
>> -
>> -
>>  ACPI_DONE=0
>>  APM_DONE=0
>>  PMU_DONE=0
>> @@ -230,6 +220,15 @@ if [ "$APM" = "force" ] || [ "$APM" = "e
>>  fi
>>
>>  if [ "$PMU" = "force" ] || [ "$PMU" = "enabled" -a -d /proc/pmu -a -d /etc/power ] ; then
>> +     # Install pm-utils hook only if pm-utils config dir is present, or force the
>> +     # install if we have a DESTDIR.
>> +     if [ -d "$DESTDIR/etc/pm/sleep.d" ] ; then
>> +             if ( ! $INSTALL -m 755 etc/pm/sleep.d/99laptop-mode "$DESTDIR/etc/pm/sleep.d" ) ; then
>> +                     echo "$0: Failed to install 99-laptop-mode into $DESTDIR/etc/pm/sleep.d. Installation failed."
>> +                     exit 36
>> +             fi
>> +     fi
>> +
>>       $INSTALL -d -m 755 "$DESTDIR/etc/power/event.d"
>>       $INSTALL -d -m 755 "$DESTDIR/etc/power/scripts.d"
>>       if ( ! $INSTALL -m 755 etc/power/scripts.d/laptop-mode "$DESTDIR/etc/power/scripts.d" ) ; then
>> _______________________________________________
>> laptop-mode mailing list
>> laptop-mode at mailman.samwel.tk
>> http://mailman.samwel.tk/mailman/listinfo/laptop-mode
>
>


More information about the laptop-mode mailing list