Fixed loginctl and added support for cinnamon and mate (patch by Leigh Scott)
Resolves: rhbz#1029868
This commit is contained in:
parent
d0e3cdb821
commit
31682fe72c
@ -3,11 +3,11 @@
|
|||||||
PATH=/sbin:/bin:/usr/bin
|
PATH=/sbin:/bin:/usr/bin
|
||||||
|
|
||||||
# Check session status using systemd
|
# Check session status using systemd
|
||||||
session_ids=$(systemd-loginctl list-sessions 2>/dev/null | awk '{print $1}')
|
session_ids=$(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=$(loginctl session-status ${session})
|
||||||
echo "${session_status}" | grep -e '\(Active: yes\|State: active\)' &> /dev/null &&
|
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\|cinnamon-settings-daemon\|kded4\|xfce4-power-manager\|mate-power-manager\)' &> /dev/null && exit 0
|
||||||
done
|
done
|
||||||
|
|
||||||
# Get the ID of the first active X11 session: using ConsoleKit
|
# Get the ID of the first active X11 session: using ConsoleKit
|
||||||
@ -30,8 +30,10 @@ ps axo uid,cmd | \
|
|||||||
awk '
|
awk '
|
||||||
$1 == '$uid_session' &&
|
$1 == '$uid_session' &&
|
||||||
($2 ~ /gnome-power-manager/ || $2 ~ /kpowersave/ ||
|
($2 ~ /gnome-power-manager/ || $2 ~ /kpowersave/ ||
|
||||||
$2 ~ /xfce4-power-manager/ || $2 ~ /\/usr\/libexec\/gnome-settings-daemon/ ||
|
$2 ~ /mate-power-manager/ || $2 ~ /xfce4-power-manager/ ||
|
||||||
$2 ~ /kded4/ || $3 ~ /guidance-power-manager/) \
|
$2 ~ /\/usr\/libexec\/gnome-settings-daemon/ ||
|
||||||
|
$2 ~ /\/usr\/libexec\/cinnamon-settings-daemon/ ||
|
||||||
|
$2 ~ /kded4/ || $3 ~ /guidance-power-manager/) \
|
||||||
{ found = 1; exit }
|
{ found = 1; exit }
|
||||||
END { exit !found }
|
END { exit !found }
|
||||||
' ||
|
' ||
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
Summary: ACPI Event Daemon
|
Summary: ACPI Event Daemon
|
||||||
Name: acpid
|
Name: acpid
|
||||||
Version: 2.0.20
|
Version: 2.0.20
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source: http://downloads.sourceforge.net/acpid2/%{name}-%{version}.tar.xz
|
Source: http://downloads.sourceforge.net/acpid2/%{name}-%{version}.tar.xz
|
||||||
@ -102,7 +102,7 @@ if [ "$1" = "2" ]; then
|
|||||||
if [ $RETCODE -eq 0 ]; then
|
if [ $RETCODE -eq 0 ]; then
|
||||||
for i in $conflist; do
|
for i in $conflist; do
|
||||||
rmdot=`echo $i | sed 's/.conf/conf/'`
|
rmdot=`echo $i | sed 's/.conf/conf/'`
|
||||||
mv $i $rmdot
|
mv $i $rmdot
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -125,6 +125,10 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 13 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.20-2
|
||||||
|
- Fixed loginctl and added support for cinnamon and mate (patch by Leigh Scott)
|
||||||
|
Resolves: rhbz#1029868
|
||||||
|
|
||||||
* Mon Sep 16 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.20-1
|
* Mon Sep 16 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.20-1
|
||||||
- New version
|
- New version
|
||||||
Resolves: rhbz#1008344
|
Resolves: rhbz#1008344
|
||||||
|
Loading…
Reference in New Issue
Block a user