summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/policykit/policykit.install
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-01-03 07:56:23 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-01-03 07:56:23 (GMT)
commit0ce6326882d1ef6b45955ce0af948aa3da22bc07 (patch)
tree6ef646f87190a95deea7641df53c6ee5396c900c /abs/extra-testing/policykit/policykit.install
parent907606040ebd98338b939452ee37698b62718820 (diff)
downloadlinhes_pkgbuild-0ce6326882d1ef6b45955ce0af948aa3da22bc07.zip
linhes_pkgbuild-0ce6326882d1ef6b45955ce0af948aa3da22bc07.tar.gz
linhes_pkgbuild-0ce6326882d1ef6b45955ce0af948aa3da22bc07.tar.bz2
Added support for Miro.
Diffstat (limited to 'abs/extra-testing/policykit/policykit.install')
-rw-r--r--abs/extra-testing/policykit/policykit.install30
1 files changed, 30 insertions, 0 deletions
diff --git a/abs/extra-testing/policykit/policykit.install b/abs/extra-testing/policykit/policykit.install
new file mode 100644
index 0000000..76a771e
--- /dev/null
+++ b/abs/extra-testing/policykit/policykit.install
@@ -0,0 +1,30 @@
+post_install() {
+ getent group policykit >/dev/null || usr/sbin/groupadd policykit
+ getent passwd policykit >/dev/null || usr/sbin/useradd -c 'PolicyKit' -u 102 -g policykit -d '/' -s /sbin/nologin policykit
+ usr/bin/passwd -l policykit &>/dev/null
+
+ # set correct permissions
+ chgrp policykit var/{run,lib}/PolicyKit
+ chown policykit var/lib/PolicyKit-public
+ chown policykit:policykit var/lib/misc/PolicyKit.reload
+
+ chown policykit usr/lib/PolicyKit/polkit-set-default-helper
+ chmod u+s usr/lib/PolicyKit/polkit-set-default-helper
+
+ for i in polkit-read-auth-helper polkit-revoke-helper polkit-grant-helper polkit-explicit-grant-helper; do
+ chgrp policykit usr/lib/PolicyKit/$i
+ chmod g+s usr/lib/PolicyKit/$i
+ done
+
+ chgrp policykit usr/lib/PolicyKit/polkit-grant-helper-pam
+ chmod u+s usr/lib/PolicyKit/polkit-grant-helper-pam
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ usr/sbin/userdel policykit &>/dev/null
+ usr/sbin/groupdel policykit &>/dev/null
+}