mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
31 lines
997 B
Text
31 lines
997 B
Text
|
post_install() {
|
||
|
getent group policykit >/dev/null || usr/sbin/groupadd -g 102 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
|
||
|
}
|