File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ udevadm control --reload-rules
10
10
# Copy polkit rules
11
11
if test $( pkaction --version | cut -d " " -f 3 | cut -d " ." -f 2) -ge 106
12
12
then
13
+ # If polkit version is >= 0.106, copy rules file
13
14
cp 10-* shutdown.rules /usr/share/polkit-1/rules.d/
14
15
else
16
+ # if polkit version is < 0.106 copy pkla file to a temporal directory
15
17
cp 50-inhibit-shutdown.pkla /tmp
16
18
fi
Original file line number Diff line number Diff line change 15
15
# if file is empty, remove it
16
16
rm $filepath
17
17
18
+ # if polkit version is < 0.106, remove pkla file to disable polkit rule
18
19
if test $( pkaction --version | cut -d " " -f 3 | cut -d " ." -f 2) -lt 106
19
20
then
20
21
rm /etc/polkit-1/localauthority/50-local.d/50-inhibit-shutdown.pkla
You can’t perform that action at this time.
0 commit comments