Description of problem: In /etc/acpi/events/power.conf "action" is defined in the following way: action=/bin/ps awwux \ | /bin/grep gnome-power-manager | /bin/grep -qv grep \ || /sbin/shutdown -h now The problem with this is that if gnome-power-manager is _not_ running, and /bin/ps will miss that grep, which happens if not that often, then we will still get a status 0 from that pipeline while it should be 1. This action should look like this pgrep -f gnome-power-manager >/dev/null || /sbin/shutdown -h now or, if mucking with /bin/ps is really preferable, /bin/ps awwux | /bin/grep -q [g]nome-power-manager \ || /sbin/shutdown -h now where both ways are not only correct but also simpler. Version-Release number of selected component (if applicable): acpid-1.0.4-5
I've been having a problem with this script. It's always powering off my machine regardless of whether gnome power manager is running. Manually running the command; /bin/ps awwux | /bin/grep gnome-power-manager | /bin/grep -qv grep || echo "Oops" will yeild no output. However disabling the script causes gnome-power-manager to close (but this is a separate bug).
> Manually running ... will yeild no output. Well, one would hope so. :-) This thing tries to say, in a complicated manner, "if gnome-power-manager is running then, and only then, do not bother with the stuff at the end of this line". Usually it even manages to do that. :-) When gnome-power-manager is running then it appears that handling of a power-button event is supposed to happen there but see bug 215822 (sigh, I am eating traling letters in words when typing).
That sounds like a real neat fix. I got some reports about this already, but most were rather unspecific. I'll include the fix in the next build of acpid. Thanks, Read ya, Phil
*** Bug 220361 has been marked as a duplicate of this bug. ***