summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-power/acpid/files/acpid-2.0.25-kde4.patch')
-rw-r--r--sys-power/acpid/files/acpid-2.0.25-kde4.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys-power/acpid/files/acpid-2.0.25-kde4.patch b/sys-power/acpid/files/acpid-2.0.25-kde4.patch
new file mode 100644
index 000000000000..1a91bb945246
--- /dev/null
+++ b/sys-power/acpid/files/acpid-2.0.25-kde4.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/515088
+
+--- acpid-2.0.25/samples/powerbtn/powerbtn.sh
++++ acpid-2.0.25/samples/powerbtn/powerbtn.sh
+@@ -57,7 +57,7 @@
+ # If one of those is running or any of several others,
+ if pidof x $PMS > /dev/null ||
+ ( test "$XUSER" != "" && pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop --user $XUSER kded kded loadedModules | grep -q klaptopdaemon) ||
+- ( test "$XUSER" != "" && test -x /usr/bin/qdbus && test -r /proc/$(pidof kded4)/environ && su - $XUSER -c "eval $(echo -n 'export '; cat /proc/$(pidof kded4)/environ |tr '\0' '\n'|grep DBUS_SESSION_BUS_ADDRESS); qdbus org.kde.kded" | grep -q powerdevil) ; then
++ ( test "$XUSER" != "" && test -x /usr/bin/qdbus && test -r /proc/$(pgrep -n kded4)/environ && su - $XUSER -c "eval $(echo -n 'export '; cat /proc/$(pgrep -n kded4)/environ |tr '\0' '\n'|grep DBUS_SESSION_BUS_ADDRESS); qdbus org.kde.kded" | grep -q powerdevil) ; then
+ # Get out as the power manager that is running will take care of things.
+ exit
+ fi