I'm quite tempted to close this as "rejected", because there is no bug,
as described. The scripts are correctly written (with the exception of
syntax errors I've noted in other bug reports), the package is behaving
as it should*, and the use of
if [ x$SOMEVARIABLE = xSOMEVALUE ];
is a common defensive coding convention to safeguard against
$SOMEVARIABLE being unset: if the test were
if [ $SOMEVARIABLE = SOMEVALUE ];
and SOMEVARIABLE were unset, the test would fail, since it would work
out to
if [ = SOMEVALUE ];
at runtime. Yes, the correct test should probably be
if [ "${SOMEVARIABLE}" = "SOMEVALUE" ];
which is cleaner, clearer, and more defensive, but that's beside the
point: The code as written works and works fine, and the script behaves
by design: if the variable is unset, or set to its default (false), the
script exits silently, because the computer in question is not a laptop.
My guess is that while testing this, more than one change was made, and
it is the cumulative effect of these changes that made the removal of
the x's work.
* The correct thing to would have been to make no changes to the scripts
and to change the value of ENABLE_LAPTOP_MODE to true in /etc/default
/acpi-support
To verify this, I suggest conn and vidar do the following:
su
apt-get --reinstall install laptop-mode-tools
vi /etc/default/acpi-support # to change ENABLE_LAPTOP_MODE
/etc/init.d/laptop-mode restart
and report their results. My guess is that with a clean package and a
proper variable setting, all will work as expected and as designed.
--
bug in /etc/init.d/laptop-mode
https://bugs.launchpad.net/bugs/108511
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