Added support for systemd-loginctl list-sessions
Resolves: rhbz#819559
This commit is contained in:
parent
34964ec259
commit
b8a715fc3f
@ -2,7 +2,16 @@
|
||||
|
||||
PATH=/sbin:/bin:/usr/bin
|
||||
|
||||
# Get the ID of the first active X11 session:
|
||||
# Check session status using systemd
|
||||
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
|
||||
done
|
||||
|
||||
# Get the ID of the first active X11 session: using ConsoleKit
|
||||
uid_session=$(
|
||||
ck-list-sessions | \
|
||||
awk '
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: ACPI Event Daemon
|
||||
Name: acpid
|
||||
Version: 2.0.16
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Daemons
|
||||
Source: http://tedfelix.com/linux/acpid-%{version}.tar.xz
|
||||
@ -129,6 +129,10 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jun 14 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.16-2
|
||||
- Added support for systemd-loginctl list-sessions
|
||||
Resolves: rhbz#819559
|
||||
|
||||
* Thu Mar 29 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.16-1
|
||||
- New version
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user