I've marked this as rejected, since the bug is not the use of ==, it is the fact that $1 is not quoted. == is the correct bash operator, but it requires two arguments. By not quoting $1, == gets only one operator when laptop_mode is invoked without arguments.
Really, laptop_mode should check for arguments before it does much else. Since I've already got an open problem report for laptop_mode bugs (#77560), I'm going to hack together a fix for this as well and attach it to that report. ** Changed in: laptop-mode-tools (Ubuntu) Status: Confirmed => Rejected -- laptop_mode bashisms https://launchpad.net/bugs/84802 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs