The point is that the /etc/init.d script is not meant to be a way to
start and stop the "laptop mode". When AC adapters are (un)plugged etc,
the /usr/sbin/laptop_mode script is run and turns on/off the mode (and
adjusts settings) accordingly (only if laptop mode is enabled by the
/var/run/laptop-mode-enabled flag). The init script is a hook to make
sure this check is done also at boot, since the adapter can have been
(un)plugged while the machine was off.

Additionally, it first creates the /var/run/laptop-mode-enabled flag at
boot (if you have set ENABLE_LAPTOP_MODE in /etc/default/acpi-support).
At shutdown the init script clears this flag, so that any later
(un)plugging won't trigger any reconfigurations (even if
ENABLE_LAPTOP_MODE is still true in the config file).

IMOH "/etc/init.d/laptop-mode status" should not say if laptop mode is
currently on (we have /usr/sbin/laptop_mode status for this) but it
should report whether laptop mode is enabled (by looking at the /var/run
flag).

-- 
Laptop mode fails to start without saying why
https://bugs.launchpad.net/bugs/95247
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to