From 05d3853edc7e577afada48a73837199a08773ef2 Mon Sep 17 00:00:00 2001 From: Ben Kohler Date: Tue, 1 Mar 2022 09:51:31 -0600 Subject: [PATCH] specs/amd64/livegui: add polkit exceptions for partition tools Signed-off-by: Ben Kohler --- .../specs/amd64/livegui/files/fsscript-stage2.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/releases/specs/amd64/livegui/files/fsscript-stage2.sh b/releases/specs/amd64/livegui/files/fsscript-stage2.sh index 5656bd3c..32931eb6 100755 --- a/releases/specs/amd64/livegui/files/fsscript-stage2.sh +++ b/releases/specs/amd64/livegui/files/fsscript-stage2.sh @@ -48,3 +48,16 @@ wget "https://dev.gentoo.org/~bkohler/livegui/face.icon.png" -O .face.icon popd # Clean up perms chown -R gentoo:users /home/gentoo + +# Let some tools run as root +echo "polkit.addRule(function(action, subject) { + if (action.id == "org.gnome.gparted") { + return polkit.Result.YES; + } +}); + +polkit.addRule(function(action, subject) { + if (action.id == "org.kde.kpmcore.externalcommand.init") { + return polkit.Result.YES; + } +});" > /etc/polkit-1/rules.d/livegui-root-tools.rules