diff -Nur e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/etc/ntp.conf/30driftfile e-smith-ntp-2.6.0/root/etc/e-smith/templates/etc/ntp.conf/30driftfile --- e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/etc/ntp.conf/30driftfile 2005-06-23 19:19:22.000000000 -0400 +++ e-smith-ntp-2.6.0/root/etc/e-smith/templates/etc/ntp.conf/30driftfile 2020-11-26 22:54:12.666000000 -0500 @@ -1,3 +1,3 @@ { - $OUT = "driftfile /etc/ntp/drift"; + $OUT = "driftfile /var/lib/drift"; } diff -Nur e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/40service e-smith-ntp-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/40service --- e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/40service 1969-12-31 19:00:00.000000000 -0500 +++ e-smith-ntp-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/40service 2020-11-26 22:56:27.760000000 -0500 @@ -0,0 +1,20 @@ +[Service] +{ + # memory limit to catch any memory leak before it kills the system + use constant MIN_MEMORY_LIMIT => 35000000; + + # If there is a memory limit in the database and it is below the minimum, delete it. + if (defined $ntpd{MemLimit} && $ntpd{MemLimit} < MIN_MEMORY_LIMIT) + { + $DB->get_prop_and_delete('ntpd','MemLimit'); + delete $ntpd{MemLimit}; + } + + $OUT .= "MemoryLimit="; + $OUT .= $ntpd{MemLimit} || MIN_MEMORY_LIMIT; + $OUT .= "\n"; + +} +ExecStartPre=-/sbin/e-smith/expand-template /etc/ntp.conf +ExecStartPre=-/sbin/e-smith/systemd/initializedate + diff -Nur e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/50MemoryLimit e-smith-ntp-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/50MemoryLimit --- e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/50MemoryLimit 2020-11-26 21:25:12.992000000 -0500 +++ e-smith-ntp-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/50MemoryLimit 1969-12-31 19:00:00.000000000 -0500 @@ -1,18 +0,0 @@ -{ - # memory limit to catch any memory leak before it kills the system - use constant MIN_MEMORY_LIMIT => 35000000; - - # If there is a memory limit in the database and it is below the minimum, delete it. - if (defined $ntpd{MemLimit} && $ntpd{MemLimit} < MIN_MEMORY_LIMIT) - { - $DB->get_prop_and_delete('ntpd','MemLimit'); - delete $ntpd{MemLimit}; - } - - $OUT = "[Service]\n"; - $OUT .= "MemoryLimit="; - $OUT .= $ntpd{MemLimit} || MIN_MEMORY_LIMIT; - $OUT .= "\n"; - -} - diff -Nur e-smith-ntp-2.6.0.old/root/sbin/e-smith/systemd/initializedate e-smith-ntp-2.6.0/root/sbin/e-smith/systemd/initializedate --- e-smith-ntp-2.6.0.old/root/sbin/e-smith/systemd/initializedate 1969-12-31 19:00:00.000000000 -0500 +++ e-smith-ntp-2.6.0/root/sbin/e-smith/systemd/initializedate 2020-11-26 23:10:27.667000000 -0500 @@ -0,0 +1,19 @@ +#!/bin/bash +#first move old drift file if in the way +OLDFILE='/etc/ntp/drift' +NEWFILE='/var/lib/ntp/drift' +if [ -f "$NEWFILE" ]; then + if [ -f "$OLDFILE" ];then + /usr/bin/rm -f $OLDFILE + fi +else + if [ -f "$OLDFILE" ];then + /usr/bin/mv $OLDFILE $NEWFILE + fi +fi +/usr/bin/chown ntp:ntp $NEWFILE + +# Run ntpdate so we're not way off on startup. +ntpstep=/etc/ntp/step-tickers +tickers=`/bin/sed -e 's/\#.*$//g' $ntpstep` +/usr/sbin/ntpdate -b -p 8 $tickers