summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-auth/polkit')
-rw-r--r--sys-auth/polkit/polkit-122-r1.ebuild (renamed from sys-auth/polkit/polkit-122.ebuild)14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys-auth/polkit/polkit-122.ebuild b/sys-auth/polkit/polkit-122-r1.ebuild
index 65f7240d5df0..fc80a36e0f16 100644
--- a/sys-auth/polkit/polkit-122.ebuild
+++ b/sys-auth/polkit/polkit-122-r1.ebuild
@@ -144,11 +144,17 @@ src_install() {
dodoc src/examples/{*.c,*.policy*}
fi
- diropts -m 0700 -o polkitd
- keepdir /usr/share/polkit-1/rules.d
+ if use daemon; then
+ if [[ ${EUID} == 0 ]]; then
+ diropts -m 0700 -o polkitd
+ fi
+ keepdir /etc/polkit-1/rules.d
+ fi
}
pkg_postinst() {
- chmod 0700 "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
- chown polkitd "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
+ if use daemon && [[ ${EUID} == 0 ]]; then
+ chmod 0700 "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
+ chown polkitd "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
+ fi
}