Added exception for plasmashell to power.sh
Related: rhbz#1319885
This commit is contained in:
parent
bc5c27a9df
commit
4e1e546e4d
@ -7,7 +7,7 @@ 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=$(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\|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
|
done
|
||||||
|
|
||||||
# Get the ID of the first active X11 session: using ConsoleKit
|
# Get the ID of the first active X11 session: using ConsoleKit
|
||||||
@ -29,12 +29,13 @@ active == "TRUE" && x11 != "" {
|
|||||||
ps axo uid,cmd | \
|
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 ~ /mate-power-manager/ || $2 ~ /xfce4-power-manager/ ||
|
$2 ~ /mate-power-manager/ || $2 ~ /xfce4-power-manager/ ||
|
||||||
$2 ~ /\/usr\/libexec\/gnome-settings-daemon/ ||
|
$2 ~ /\/usr\/libexec\/gnome-settings-daemon/ ||
|
||||||
$2 ~ /\/usr\/libexec\/cinnamon-settings-daemon/ ||
|
$2 ~ /\/usr\/libexec\/cinnamon-settings-daemon/ ||
|
||||||
$2 ~ /kded[4-5]/ || $3 ~ /guidance-power-manager/) \
|
$2 ~ /kded[4-5]/ || $2 ~ /guidance-power-manager/ ||
|
||||||
{ found = 1; exit }
|
$2 ~ /plasmashell/) \
|
||||||
|
{ found = 1; exit }
|
||||||
END { exit !found }
|
END { exit !found }
|
||||||
' ||
|
' ||
|
||||||
shutdown -h now
|
shutdown -h now
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
Summary: ACPI Event Daemon
|
Summary: ACPI Event Daemon
|
||||||
Name: acpid
|
Name: acpid
|
||||||
Version: 2.0.27
|
Version: 2.0.27
|
||||||
Release: 2%{?dist}
|
Release: 3%{?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
|
||||||
@ -135,6 +135,10 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
* Wed Jul 20 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.27-2
|
||||||
- Added exception for kded5 to power.sh
|
- Added exception for kded5 to power.sh
|
||||||
Resolves: rhbz#1319885
|
Resolves: rhbz#1319885
|
||||||
|
Loading…
Reference in New Issue
Block a user