aboutsummaryrefslogtreecommitdiff
path: root/files/usr/local/etc/polkit-1/rules.d
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-11-05 22:36:37 -0500
committerCullum Smith <cullum@sacredheartsc.com>2024-11-05 22:36:37 -0500
commitd59873c24a005c513eb5622408eb244bcd3170e3 (patch)
treedebbc5fa7b3f6db7766045edab548960e9c98dad /files/usr/local/etc/polkit-1/rules.d
parent9bf973864ed3deaa05979d25733a05bf5bc09db4 (diff)
downloadinfrastructure-d59873c24a005c513eb5622408eb244bcd3170e3.tar.gz
fix polkit rules
Diffstat (limited to 'files/usr/local/etc/polkit-1/rules.d')
-rw-r--r--files/usr/local/etc/polkit-1/rules.d/51-desktop.rules.desktop7
1 files changed, 7 insertions, 0 deletions
diff --git a/files/usr/local/etc/polkit-1/rules.d/51-desktop.rules.desktop b/files/usr/local/etc/polkit-1/rules.d/51-desktop.rules.desktop
index d57c4b9..5cab6db 100644
--- a/files/usr/local/etc/polkit-1/rules.d/51-desktop.rules.desktop
+++ b/files/usr/local/etc/polkit-1/rules.d/51-desktop.rules.desktop
@@ -1,4 +1,11 @@
polkit.addRule(function (action, subject) {
+$(if [ "${polkit_disable_suspend:-}" = true ]; then cat <<EOF
+ if (action.id == "org.freedesktop.consolekit.system.suspend" ||
+ action.id == "org.freedesktop.consolekit.system.hibernate") {
+ return polkit.Result.NO;
+ }
+EOF
+fi)
if ((action.id == "org.freedesktop.consolekit.system.restart" ||
action.id == "org.freedesktop.consolekit.system.stop" ||
action.id == "org.freedesktop.consolekit.system.suspend")