--- rpms/e-smith-ntp/sme10/e-smith-ntp-2.6.0-bz11008-bz8881-improve-systemd-driftfile.patch 2020/11/27 04:14:40 1.1 +++ rpms/e-smith-ntp/sme10/e-smith-ntp-2.6.0-bz11008-bz8881-improve-systemd-driftfile.patch 2020/11/27 04:29:39 1.2 @@ -75,3 +75,49 @@ diff -Nur e-smith-ntp-2.6.0.old/root/sbi +ntpstep=/etc/ntp/step-tickers +tickers=`/bin/sed -e 's/\#.*$//g' $ntpstep` +/usr/sbin/ntpdate -b -p 8 $tickers +diff -Nur e-smith-ntp-2.6.0.old/createlinks e-smith-ntp-2.6.0/createlinks +--- e-smith-ntp-2.6.0.old/createlinks 2020-11-26 23:15:25.616000000 -0500 ++++ e-smith-ntp-2.6.0/createlinks 2020-11-26 23:28:33.145000000 -0500 +@@ -63,11 +63,12 @@ + + $event = "e-smith-ntp-update"; + +-foreach my $file (qw(/etc/ntp/step-tickers /etc/ntp.conf /usr/lib//systemd/system/ntpd.service.d/50koozali.conf)) ++foreach my $file (qw(/etc/ntp/step-tickers /etc/ntp.conf /usr/lib//systemd/system/ntpd.service.d/50koozali.conf /etc/systemd/system-preset/49-koozali.preset)) + { + templates2events( $file, $event ); + } + ++event_link("systemd-default", $event, "10"); + event_link("conf-timezone", $event, "30"); + event_link("set-time-date", $event, "40"); + event_link("systemd-reload", $event, "50"); +diff -Nur e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/80-koozali-ntp.preset e-smith-ntp-2.6.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/80-koozali-ntp.preset +--- e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/80-koozali-ntp.preset 1969-12-31 19:00:00.000000000 -0500 ++++ e-smith-ntp-2.6.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/80-koozali-ntp.preset 2020-11-26 23:22:46.951000000 -0500 +@@ -0,0 +1,13 @@ ++# nut UPS specific subservices ++{ ++my $status = $ntp{status} || 'disabled'; ++ ++if ($status eq 'enabled') { ++ $OUT .= "disable ntpdate.service"; ++ $OUT .= "enable ntpd.service"; ++ } ++else ++ { ++ $OUT .= "disable ntpdate.service"; ++ $OUT .= "disable ntpd.service"; ++ } +diff -Nur e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/80install e-smith-ntp-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/80install +--- e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/80install 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/80install 2020-11-26 23:26:16.570000000 -0500 +@@ -0,0 +1,2 @@ ++[Install] ++WantedBy=sme-server.target +diff -Nur e-smith-ntp-2.6.0.old/root/etc/systemd/system-preset/80-koozali-ntp.preset e-smith-ntp-2.6.0/root/etc/systemd/system-preset/80-koozali-ntp.preset +--- e-smith-ntp-2.6.0.old/root/etc/systemd/system-preset/80-koozali-ntp.preset 2020-11-26 23:15:25.618000000 -0500 ++++ e-smith-ntp-2.6.0/root/etc/systemd/system-preset/80-koozali-ntp.preset 1969-12-31 19:00:00.000000000 -0500 +@@ -1,2 +0,0 @@ +-enable ntpdate.service +-enable ntpd.service