slackware-current/source/n/ntp/doinst.sh
Patrick J Volkerding bace514a49 Sat Jun 1 19:52:37 UTC 2024
a/findutils-4.10.0-x86_64-1.txz:  Upgraded.
a/logrotate-3.22.0-x86_64-1.txz:  Upgraded.
  Thanks to opty for getting our changes accepted upstream.
a/sysvinit-scripts-15.1-noarch-18.txz:  Rebuilt.
  rc.M: start dnsmasq before ntpd. Thanks to lostintime.
d/git-2.45.2-x86_64-1.txz:  Upgraded.
d/poke-4.1-x86_64-1.txz:  Upgraded.
kde/fcitx5-configtool-5.1.6-x86_64-1.txz:  Upgraded.
kde/kwin-5.27.11-x86_64-2.txz:  Rebuilt.
  Recompiled against wayland-1.23.0 since it seems they broke the ABI.
  Let me know if anything else needs help.
kde/libindi-2.0.8-x86_64-1.txz:  Upgraded.
l/mujs-1.3.4-x86_64-1.txz:  Added.
l/python-zipp-3.19.1-x86_64-1.txz:  Upgraded.
n/ntp-4.2.8p18-x86_64-2.txz:  Rebuilt.
  rc.ntp: properly create the PID file on start.
  Add /etc/default/ntp to configure ntpd startup options since some people are
  needing to add -4 to avoid an error.
  Thanks to rkelsen and teoberi.
x/fcitx5-5.1.10-x86_64-1.txz:  Upgraded.
x/fcitx5-chinese-addons-5.1.6-x86_64-1.txz:  Upgraded.
x/fcitx5-hangul-5.1.4-x86_64-1.txz:  Upgraded.
x/fcitx5-kkc-5.1.4-x86_64-1.txz:  Upgraded.
x/fcitx5-table-extra-5.1.6-x86_64-1.txz:  Upgraded.
x/fcitx5-table-other-5.1.3-x86_64-1.txz:  Upgraded.
x/libime-1.1.8-x86_64-1.txz:  Upgraded.
x/xcb-imdkit-1.0.9-x86_64-1.txz:  Upgraded.
xap/blueman-2.4.2-x86_64-1.txz:  Upgraded.
xap/mpv-0.38.0-x86_64-3.txz:  Rebuilt.
  Recompiled against mujs-1.3.4.
2024-06-01 22:44:21 +02:00

27 lines
706 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...
}
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 etc/default/ntp.new
config etc/logrotate.d/ntp.new
config etc/ntp.conf.new
config etc/ntp.keys.new
preserve_perms etc/rc.d/rc.ntpd.new