From c8725a622bf350ed680445add5ea01bb54908cc8 Mon Sep 17 00:00:00 2001 From: Jaroslav Škarvada Date: Jul 09 2012 07:38:51 +0000 Subject: Update of power.sh to be compatible with new systemd-loginctl Resolves: rhbz#819547 --- diff --git a/acpid.power.sh b/acpid.power.sh index c13cf7e..97a5fbc 100644 --- a/acpid.power.sh +++ b/acpid.power.sh @@ -6,9 +6,8 @@ PATH=/sbin:/bin:/usr/bin session_ids=$(systemd-loginctl list-sessions 2>/dev/null | awk '{print $1}') for session in ${session_ids} ; do session_status=$(systemd-loginctl session-status ${session}) - if [ -n "$(echo "${session_status}" | grep "Active: yes" 2> /dev/null)" ]; then - echo "${session_status}" | grep -e '\(gnome-settings-daemon\|kded4\|xfce4-power-manager\)' >& /dev/null && exit 0 - fi + echo "${session_status}" | grep -e '\(Active: yes\|State: active\)' &> /dev/null && + echo "${session_status}" | grep -e '\(gnome-settings-daemon\|kded4\|xfce4-power-manager\)' &> /dev/null && exit 0 done # Get the ID of the first active X11 session: using ConsoleKit diff --git a/acpid.spec b/acpid.spec index aad00ba..b1eaf9b 100644 --- a/acpid.spec +++ b/acpid.spec @@ -1,7 +1,7 @@ Summary: ACPI Event Daemon Name: acpid Version: 2.0.16 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: System Environment/Daemons Source: http://tedfelix.com/linux/acpid-%{version}.tar.xz @@ -129,6 +129,10 @@ fi %changelog +* Mon Jul 9 2012 Jaroslav Škarvada - 2.0.16-4 +- Update of power.sh to be compatible with new systemd-loginctl + Resolves: rhbz#819547 + * Thu Jun 14 2012 Jaroslav Škarvada - 2.0.16-3 - Silenced possible ck-list-sessions errors in power.sh