/[smeserver]/rpms/e-smith-ntp/sme10/e-smith-ntp-2.6.0-bz11008-bz8881-improve-systemd-driftfile.patch
ViewVC logotype

Diff of /rpms/e-smith-ntp/sme10/e-smith-ntp-2.6.0-bz11008-bz8881-improve-systemd-driftfile.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by jpp, Fri Nov 27 04:14:40 2020 UTC Revision 1.11 by jpp, Mon Feb 6 06:58:10 2023 UTC
# Line 4  diff -Nur e-smith-ntp-2.6.0.old/root/etc Line 4  diff -Nur e-smith-ntp-2.6.0.old/root/etc
4  @@ -1,3 +1,3 @@  @@ -1,3 +1,3 @@
5   {   {
6  -    $OUT = "driftfile /etc/ntp/drift";  -    $OUT = "driftfile /etc/ntp/drift";
7  +    $OUT = "driftfile /var/lib/drift";  +    $OUT = "driftfile /var/lib/ntp/drift";
8   }   }
9  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  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
10  --- 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.old/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/40service     1969-12-31 19:00:00.000000000 -0500
# Line 55  diff -Nur e-smith-ntp-2.6.0.old/root/etc Line 55  diff -Nur e-smith-ntp-2.6.0.old/root/etc
55  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  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
56  --- 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.old/root/sbin/e-smith/systemd/initializedate      1969-12-31 19:00:00.000000000 -0500
57  +++ e-smith-ntp-2.6.0/root/sbin/e-smith/systemd/initializedate  2020-11-26 23:10:27.667000000 -0500  +++ e-smith-ntp-2.6.0/root/sbin/e-smith/systemd/initializedate  2020-11-26 23:10:27.667000000 -0500
58  @@ -0,0 +1,19 @@  @@ -0,0 +1,21 @@
59  +#!/bin/bash  +#!/bin/bash
60  +#first move old drift file if in the way  +#first move old drift file if in the way
61  +OLDFILE='/etc/ntp/drift'  +OLDFILE='/etc/ntp/drift'
# Line 69  diff -Nur e-smith-ntp-2.6.0.old/root/sbi Line 69  diff -Nur e-smith-ntp-2.6.0.old/root/sbi
69  +                /usr/bin/mv $OLDFILE  $NEWFILE  +                /usr/bin/mv $OLDFILE  $NEWFILE
70  +        fi  +        fi
71  +fi  +fi
72  +/usr/bin/chown ntp:ntp $NEWFILE  +if [ -f "$NEWFILE" ]; then
73    +        /usr/bin/chown ntp:ntp $NEWFILE
74    +fi
75  +  +
76  +# Run ntpdate so we're not way off on startup.  +# Run ntpdate so we're not way off on startup.
77  +ntpstep=/etc/ntp/step-tickers  +ntpstep=/etc/ntp/step-tickers
78  +tickers=`/bin/sed -e 's/\#.*$//g' $ntpstep`  +tickers=`/bin/sed -e 's/\#.*$//g' $ntpstep`
79  +/usr/sbin/ntpdate -b -p 8 $tickers  +/usr/sbin/ntpdate -b -p 8 $tickers
80    diff -Nur e-smith-ntp-2.6.0.old/createlinks e-smith-ntp-2.6.0/createlinks
81    --- e-smith-ntp-2.6.0.old/createlinks   2020-11-26 23:15:25.616000000 -0500
82    +++ e-smith-ntp-2.6.0/createlinks       2020-11-26 23:28:33.145000000 -0500
83    @@ -63,11 +63,12 @@
84    
85     $event = "e-smith-ntp-update";
86    
87    -foreach my $file (qw(/etc/ntp/step-tickers /etc/ntp.conf /usr/lib//systemd/system/ntpd.service.d/50koozali.conf))
88    +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))
89     {
90         templates2events( $file, $event );
91     }
92    
93    +event_link("systemd-default", $event, "10");
94     event_link("conf-timezone", $event, "30");
95     event_link("set-time-date", $event, "40");
96     event_link("systemd-reload", $event, "50");
97    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
98    --- 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
99    +++ 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
100    @@ -0,0 +1,14 @@
101    +# nut UPS specific subservices
102    +{
103    +my $status = $ntp{status} || 'disabled';
104    +
105    +if ($status eq 'enabled') {
106    +        $OUT .= "disable        ntpdate.service\n";
107    +        $OUT .= "enable         ntpd.service\n";
108    +  }
109    +else
110    +  {
111    +        $OUT .= "disable       ntpdate.service\n";
112    +        $OUT .= "disable       ntpd.service\n";
113    +  }
114    +}
115    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
116    --- 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
117    +++ 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
118    @@ -0,0 +1,2 @@
119    +[Install]
120    +WantedBy=sme-server.target
121    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
122    --- e-smith-ntp-2.6.0.old/root/etc/systemd/system-preset/80-koozali-ntp.preset  2020-11-26 23:15:25.618000000 -0500
123    +++ e-smith-ntp-2.6.0/root/etc/systemd/system-preset/80-koozali-ntp.preset      1969-12-31 19:00:00.000000000 -0500
124    @@ -1,2 +0,0 @@
125    -enable ntpdate.service
126    -enable ntpd.service
127    diff -Nur e-smith-ntp-2.6.0.old/createlinks e-smith-ntp-2.6.0/createlinks
128    --- e-smith-ntp-2.6.0.old/createlinks   2020-11-26 23:49:32.684000000 -0500
129    +++ e-smith-ntp-2.6.0/createlinks       2020-11-26 23:49:53.047000000 -0500
130    @@ -70,7 +70,6 @@
131    
132     event_link("systemd-default", $event, "10");
133     event_link("conf-timezone", $event, "30");
134    -event_link("set-time-date", $event, "40");
135     event_link("systemd-reload", $event, "50");
136    
137     safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ntpd");
138    diff -Nur e-smith-ntp-2.6.0.old/root/usr/lib/systemd/system/ntpd.service.d/50koozali.conf e-smith-ntp-2.6.0/root/usr/lib/systemd/system/ntpd.service.d/50koozali.conf
139    --- e-smith-ntp-2.6.0.old/root/usr/lib/systemd/system/ntpd.service.d/50koozali.conf     2020-11-26 23:56:30.134000000 -0500
140    +++ e-smith-ntp-2.6.0/root/usr/lib/systemd/system/ntpd.service.d/50koozali.conf 1969-12-31 19:00:00.000000000 -0500
141    @@ -1,2 +0,0 @@
142    -[Service]
143    -MemoryLimit=250000
144    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
145    --- e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/80-koozali-ntp.preset  2020-11-27 09:37:05.531000000 -0500
146    +++ e-smith-ntp-2.6.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/80-koozali-ntp.preset      2020-11-27 09:38:47.124000000 -0500
147    @@ -1,14 +1,4 @@
148    -# nut UPS specific subservices
149    -{
150    -my $status = $ntp{status} || 'disabled';
151    +# nut ntpd specific subservices
152    +# this would conflict with ntpd
153    +disable        ntpdate.service
154    
155    -if ($status eq 'enabled') {
156    -        $OUT .= "disable        ntpdate.service\n";
157    -        $OUT .= "enable         ntpd.service\n";
158    -  }
159    -else
160    -  {
161    -        $OUT .= "disable       ntpdate.service\n";
162    -        $OUT .= "disable       ntpd.service\n";
163    -  }
164    -}


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed