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}')
|
session_ids=$(systemd-loginctl list-sessions 2>/dev/null | awk '{print $1}')
|
||||||
for session in ${session_ids} ; do
|
for session in ${session_ids} ; do
|
||||||
session_status=$(systemd-loginctl session-status ${session})
|
session_status=$(systemd-loginctl session-status ${session})
|
||||||
if [ -n "$(echo "${session_status}" | grep "Active: yes" 2> /dev/null)" ]; then
|
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
|
echo "${session_status}" | grep -e '\(gnome-settings-daemon\|kded4\|xfce4-power-manager\)' &> /dev/null && exit 0
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Get the ID of the first active X11 session: using ConsoleKit
|
# Get the ID of the first active X11 session: using ConsoleKit
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: ACPI Event Daemon
|
Summary: ACPI Event Daemon
|
||||||
Name: acpid
|
Name: acpid
|
||||||
Version: 2.0.16
|
Version: 2.0.16
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source: http://tedfelix.com/linux/acpid-%{version}.tar.xz
|
Source: http://tedfelix.com/linux/acpid-%{version}.tar.xz
|
||||||
@ -129,6 +129,10 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
* Thu Jun 14 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.16-3
|
||||||
- Silenced possible ck-list-sessions errors in power.sh
|
- Silenced possible ck-list-sessions errors in power.sh
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user