slackbuilds_ponce/system/cronie/doinst.sh
B. Watson dbd163adc6
system/cronie: Updated for version 1.6.1, new maintainer.
Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2023-08-12 08:29:52 +07:00

25 lines
528 B
Bash

config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
rm $NEW
fi
}
preserve_perms() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ -e $OLD ]; then
cp -a $OLD ${NEW}.incoming
cat $NEW > ${NEW}.incoming
mv ${NEW}.incoming $NEW
fi
config $NEW
}
config var/spool/cron/root.new
config etc/cron.deny.new
config etc/default/crond.new
preserve_perms etc/rc.d/rc.crond.new