[acpid] Update of power.sh to be compatible with new systemd-loginctl
Jaroslav Škarvada
jskarvad at fedoraproject.org
Mon Jul 9 07:39:05 UTC 2012
commit c8725a622bf350ed680445add5ea01bb54908cc8
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date: Mon Jul 9 09:38:51 2012 +0200
Update of power.sh to be compatible with new systemd-loginctl
Resolves: rhbz#819547
acpid.power.sh | 5 ++---
acpid.spec | 6 +++++-
2 files changed, 7 insertions(+), 4 deletions(-)
---
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 <jskarvad at redhat.com> - 2.0.16-4
+- Update of power.sh to be compatible with new systemd-loginctl
+ Resolves: rhbz#819547
+
* Thu Jun 14 2012 Jaroslav Škarvada <jskarvad at redhat.com> - 2.0.16-3
- Silenced possible ck-list-sessions errors in power.sh
More information about the scm-commits
mailing list