Added exception for plasmashell to power.sh

Related: rhbz#1319885
This commit is contained in:
Jaroslav Škarvada 2016-07-20 16:58:29 +02:00
parent bc5c27a9df
commit 4e1e546e4d
2 changed files with 11 additions and 6 deletions

View File

@ -7,7 +7,7 @@ session_ids=$(loginctl list-sessions 2>/dev/null | awk '{print $1}')
for session in ${session_ids} ; do
session_status=$(loginctl session-status ${session})
echo "${session_status}" | grep -e '\(Active: yes\|State: active\)' &> /dev/null &&
echo "${session_status}" | grep -e '\(gnome-settings-daemon\|cinnamon-settings-daemon\|kded[4-5]\|xfce4-power-manager\|mate-power-manager\)' &> /dev/null && exit 0
echo "${session_status}" | grep -e '\(gnome-settings-daemon\|cinnamon-settings-daemon\|kded[4-5]\|plasmashell\|xfce4-power-manager\|mate-power-manager\)' &> /dev/null && exit 0
done
# Get the ID of the first active X11 session: using ConsoleKit
@ -33,7 +33,8 @@ awk '
$2 ~ /mate-power-manager/ || $2 ~ /xfce4-power-manager/ ||
$2 ~ /\/usr\/libexec\/gnome-settings-daemon/ ||
$2 ~ /\/usr\/libexec\/cinnamon-settings-daemon/ ||
$2 ~ /kded[4-5]/ || $3 ~ /guidance-power-manager/) \
$2 ~ /kded[4-5]/ || $2 ~ /guidance-power-manager/ ||
$2 ~ /plasmashell/) \
{ found = 1; exit }
END { exit !found }
' ||

View File

@ -8,7 +8,7 @@
Summary: ACPI Event Daemon
Name: acpid
Version: 2.0.27
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2+
Group: System Environment/Daemons
Source: http://downloads.sourceforge.net/acpid2/%{name}-%{version}.tar.xz
@ -135,6 +135,10 @@ fi
%changelog
* Wed Jul 20 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.27-3
- Added exception for plasmashell to power.sh
Related: rhbz#1319885
* Wed Jul 20 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.27-2
- Added exception for kded5 to power.sh
Resolves: rhbz#1319885