summarylogtreecommitdiffstats
path: root/polkit.install
diff options
context:
space:
mode:
authorreplabrobin2015-08-16 20:23:22 +0100
committerreplabrobin2015-08-16 20:23:22 +0100
commit0e0a36a7ab7616f920598689fee8aa036d3f8e07 (patch)
treee3496b5f1d69853c086e6c25cd4175a1c116a625 /polkit.install
downloadaur-0e0a36a7ab7616f920598689fee8aa036d3f8e07.tar.gz
cloned from old aur http://pkgbuild.com/git/aur-mirror.git/
Diffstat (limited to 'polkit.install')
-rw-r--r--polkit.install18
1 files changed, 18 insertions, 0 deletions
diff --git a/polkit.install b/polkit.install
new file mode 100644
index 000000000000..fbb98919ed25
--- /dev/null
+++ b/polkit.install
@@ -0,0 +1,18 @@
+post_install() {
+ getent group polkitd >/dev/null || groupadd -g 102 polkitd
+ getent passwd polkitd >/dev/null || useradd -c 'Policy Kit Daemon' -u 102 -g polkitd -d '/' -s /bin/false polkitd
+ passwd -l polkitd &>/dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ if getent passwd polkitd >/dev/null; then
+ userdel polkitd
+ fi
+ if getent group polkitd >/dev/null; then
+ groupdel polkitd
+ fi
+}