diff options
author | Cullum Smith <cullum@sacredheartsc.com> | 2024-11-05 22:36:37 -0500 |
---|---|---|
committer | Cullum Smith <cullum@sacredheartsc.com> | 2024-11-05 22:36:37 -0500 |
commit | d59873c24a005c513eb5622408eb244bcd3170e3 (patch) | |
tree | debbc5fa7b3f6db7766045edab548960e9c98dad /files/usr/local/etc/polkit-1/rules.d | |
parent | 9bf973864ed3deaa05979d25733a05bf5bc09db4 (diff) | |
download | infrastructure-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.desktop | 7 |
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") |