Update of power.sh to be compatible with new systemd-loginctl
Resolves: rhbz#819547
This commit is contained in:
parent
ade213e454
commit
c8725a622b
@ -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
|
||||
|
@ -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@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@redhat.com> - 2.0.16-3
|
||||
- Silenced possible ck-list-sessions errors in power.sh
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user