summaryrefslogtreecommitdiff
path: root/source/n/ntp/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/ntp/doinst.sh')
-rw-r--r--source/n/ntp/doinst.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/n/ntp/doinst.sh b/source/n/ntp/doinst.sh
index 1e74ce44..bc542990 100644
--- a/source/n/ntp/doinst.sh
+++ b/source/n/ntp/doinst.sh
@@ -9,10 +9,20 @@ config() {
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/ntp.conf.new
config etc/ntp/ntp.keys.new
if [ -r etc/rc.d/rc.ntpd -a -r etc/rc.d/rc.ntpd.new ]; then
chmod --reference=etc/rc.d/rc.ntpd etc/rc.d/rc.ntpd.new
fi
-config etc/rc.d/rc.ntpd.new
+mv etc/rc.d/rc.ntpd.new etc/rc.d/rc.ntpd