slackware-current/source/l/polkit/doinst.sh
Patrick J Volkerding 45d1307fae Wed Feb 1 05:29:53 UTC 2023
d/perl-5.36.0-x86_64-3.txz:  Rebuilt.
  Upgraded: IO-Socket-SSL-2.081, Moo-2.005005, Path-Tiny-0.144,
  Sub-Quote-2.006008, Template-Toolkit-3.101, URI-5.17.
  Added: JSON-4.10 (needed to build Samba with --bundled-libraries=heimdal).
kde/kstars-3.6.3-x86_64-1.txz:  Upgraded.
l/gjs-1.74.1-x86_64-1.txz:  Upgraded.
  Compiled against mozjs102-102.7.0esr.
l/mozjs102-102.7.0esr-x86_64-1.txz:  Added.
  This is required by gjs-1.74.1 and polkit-122.
l/mozjs78-78.15.0esr-x86_64-1.txz:  Removed.
l/polkit-122-x86_64-1.txz:  Upgraded.
  Compiled against mozjs102-102.7.0esr.
2023-02-01 07:39:17 +01:00

30 lines
899 B
Bash

config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/pam.d/polkit-1.new
# Make sure the polkitd user and group exist:
if ! grep -q "^polkitd:" etc/passwd ; then
echo "polkitd:x:87:87:PolicyKit daemon owner:/var/lib/polkit:/bin/false" >> etc/passwd
fi
if ! grep -q "^polkitd:" etc/group ; then
echo "polkitd:x:87:" >> etc/group
fi
# Remove obsolete rules:
rm -f etc/polkit-1/localauthority/50-local.d/*.pkla{,.new}
rm -f etc/polkit-1/rules.d/*.pkla{,.new}
# Remove obsolete directory:
rmdir etc/polkit-1/localauthority/50-local.d 2> /dev/null
rmdir etc/polkit-1/localauthority 2> /dev/null