/[smeserver]/rpms/e-smith-ntp/sme10/e-smith-ntp-2.6.0-bz11008_systemd.patch
ViewVC logotype

Annotation of /rpms/e-smith-ntp/sme10/e-smith-ntp-2.6.0-bz11008_systemd.patch

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


Revision 1.4 - (hide annotations) (download)
Sun Dec 13 22:32:47 2020 UTC (3 years, 10 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-ntp-2_6_0-16_el7_sme, e-smith-ntp-2_6_0-13_el7_sme, e-smith-ntp-2_6_0-18_el7_sme, e-smith-ntp-2_6_0-15_el7_sme, e-smith-ntp-2_6_0-12_el7_sme, e-smith-ntp-2_6_0-14_el7_sme, e-smith-ntp-2_6_0-17_el7_sme, HEAD
Changes since 1.3: +1 -1 lines
* Sun Dec 13 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-12.sme
- update override.conf to 50koozali.conf [SME: 11008]

1 michel 1.1 diff -urN e-smith-ntp-2.6.0.old/createlinks e-smith-ntp-2.6.0/createlinks
2     --- e-smith-ntp-2.6.0.old/createlinks 2020-09-22 19:19:21.000000001 +0400
3     +++ e-smith-ntp-2.6.0/createlinks 2020-11-14 12:36:11.509946279 +0400
4     @@ -19,7 +19,7 @@
5    
6     # Configuration template expansion of ntp.conf
7     foreach my $file (
8     - qw(/etc/ntp/step-tickers /etc/ntp.conf /var/service/ntpd/env/MEMLIMIT))
9 jpp 1.4 + qw(/etc/ntp/step-tickers /etc/ntp.conf /usr/lib//systemd/system/ntpd.service.d/50koozali.conf))
10 michel 1.1 {
11     templates2events($file, qw(
12     timeserver-update
13     @@ -57,9 +57,22 @@
14    
15     event_link("conf-timezone", $event, "04");
16    
17     -# Link smbd and nmbd to daemontools.
18     -safe_symlink("../daemontools", "root/etc/rc.d/init.d/supervise/ntpd");
19     +#--------------------------------------------------
20     +# actions for e-smith-ntp-update event
21     +#--------------------------------------------------
22    
23     -service_link_enhanced("ntpd", "S80", "7");
24     -safe_symlink("../init.d/supervise/ntpd", "root/etc/rc.d/rc6.d/K26ntpd");
25     -safe_symlink("../init.d/supervise/ntpd", "root/etc/rc.d/rc0.d/K26ntpd");
26     +$event = "e-smith-ntp-update";
27     +
28 jpp 1.2 +foreach my $file (qw(/etc/ntp/step-tickers /etc/ntp.conf /usr/lib//systemd/system/ntpd.service.d/50koozali.conf))
29 michel 1.1 +{
30     + templates2events( $file, $event );
31     +}
32     +
33     +event_link("conf-timezone", $event, "30");
34     +event_link("set-time-date", $event, "40");
35     +event_link("systemd-reload", $event, "50");
36     +
37     +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ntpd");
38     +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog");
39     +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/squid");
40     +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
41 jpp 1.2 diff -urN 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
42     --- e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/usr/lib//systemd/system/ntpd.service.d/50koozali.conf/50MemoryLimit 1970-01-01 04:00:00.000000000 +0400
43     +++ e-smith-ntp-2.6.0/root/etc/e-smith/templates/usr/lib//systemd/system/ntpd.service.d/50koozali.conf/50MemoryLimit 2020-11-14 23:24:56.964745677 +0400
44 michel 1.1 @@ -0,0 +1,18 @@
45     +{
46     + # memory limit to catch any memory leak before it kills the system
47     + use constant MIN_MEMORY_LIMIT => 35000000;
48     +
49     + # If there is a memory limit in the database and it is below the minimum, delete it.
50     + if (defined $ntpd{MemLimit} && $ntpd{MemLimit} < MIN_MEMORY_LIMIT)
51     + {
52     + $DB->get_prop_and_delete('ntpd','MemLimit');
53     + delete $ntpd{MemLimit};
54     + }
55     +
56     + $OUT = "[Service]\n";
57     + $OUT .= "MemoryLimit=";
58     + $OUT .= $ntpd{MemLimit} || MIN_MEMORY_LIMIT;
59     + $OUT .= "\n";
60     +
61     +}
62     +
63     diff -urN e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/var/service/ntpd/env/MEMLIMIT e-smith-ntp-2.6.0/root/etc/e-smith/templates/var/service/ntpd/env/MEMLIMIT
64     --- e-smith-ntp-2.6.0.old/root/etc/e-smith/templates/var/service/ntpd/env/MEMLIMIT 2016-02-06 02:20:09.000000001 +0400
65     +++ e-smith-ntp-2.6.0/root/etc/e-smith/templates/var/service/ntpd/env/MEMLIMIT 1970-01-01 04:00:00.000000000 +0400
66     @@ -1,14 +0,0 @@
67     -{
68     - # memory limit to catch any memory leak before it kills the system
69     - use constant MIN_MEMORY_LIMIT => 35000000;
70     -
71     - # If there is a memory limit in the database and it is below the minimum, delete it.
72     - if (defined $ntpd{MemLimit} && $ntpd{MemLimit} < MIN_MEMORY_LIMIT)
73     - {
74     - $DB->get_prop_and_delete('ntpd','MemLimit');
75     - delete $ntpd{MemLimit};
76     - }
77     -
78     - $OUT = $ntpd{MemLimit} || MIN_MEMORY_LIMIT;
79     -}
80     -
81 jpp 1.2 diff -urN 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
82     --- e-smith-ntp-2.6.0.old/root/usr/lib//systemd/system/ntpd.service.d/50koozali.conf 1970-01-01 04:00:00.000000000 +0400
83     +++ e-smith-ntp-2.6.0/root/usr/lib//systemd/system/ntpd.service.d/50koozali.conf 2020-11-14 11:10:29.000000001 +0400
84 michel 1.1 @@ -0,0 +1,2 @@
85     +[Service]
86     +MemoryLimit=250000
87     diff -urN 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
88     --- e-smith-ntp-2.6.0.old/root/etc/systemd/system-preset/80-koozali-ntp.preset 1970-01-01 04:00:00.000000000 +0400
89     +++ e-smith-ntp-2.6.0/root/etc/systemd/system-preset/80-koozali-ntp.preset 2020-11-14 10:18:52.000000001 +0400
90     @@ -0,0 +1,2 @@
91     +enable ntpdate.service
92     +enable ntpd.service
93     diff -urN e-smith-ntp-2.6.0.old/root/var/service/ntpd/log/run e-smith-ntp-2.6.0/root/var/service/ntpd/log/run
94     --- e-smith-ntp-2.6.0.old/root/var/service/ntpd/log/run 2004-01-22 01:44:46.000000001 +0400
95     +++ e-smith-ntp-2.6.0/root/var/service/ntpd/log/run 1970-01-01 04:00:00.000000000 +0400
96     @@ -1,25 +0,0 @@
97     -#!/bin/sh
98     -#----------------------------------------------------------------------
99     -# copyright (C) 1999-2003 Mitel Networks Corporation
100     -#
101     -# This program is free software; you can redistribute it and/or modify
102     -# it under the terms of the GNU General Public License as published by
103     -# the Free Software Foundation; either version 2 of the License, or
104     -# (at your option) any later version.
105     -#
106     -# This program is distributed in the hope that it will be useful,
107     -# but WITHOUT ANY WARRANTY; without even the implied warranty of
108     -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
109     -# GNU General Public License for more details.
110     -#
111     -# You should have received a copy of the GNU General Public License
112     -# along with this program; if not, write to the Free Software
113     -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
114     -#
115     -# Technical support for this program is available from Mitel Networks
116     -# Please visit our web site www.mitel.com for details.
117     -#----------------------------------------------------------------------
118     -exec \
119     - /usr/local/bin/setuidgid smelog \
120     - /usr/local/bin/multilog t s5000000 \
121     - /var/log/ntpd
122     diff -urN e-smith-ntp-2.6.0.old/root/var/service/ntpd/run e-smith-ntp-2.6.0/root/var/service/ntpd/run
123     --- e-smith-ntp-2.6.0.old/root/var/service/ntpd/run 2008-10-07 21:36:26.000000001 +0400
124     +++ e-smith-ntp-2.6.0/root/var/service/ntpd/run 1970-01-01 04:00:00.000000000 +0400
125     @@ -1,36 +0,0 @@
126     -#!/bin/sh
127     -#----------------------------------------------------------------------
128     -# copyright (C) 1999-2004 Mitel Networks Corporation
129     -#
130     -# This program is free software; you can redistribute it and/or modify
131     -# it under the terms of the GNU General Public License as published by
132     -# the Free Software Foundation; either version 2 of the License, or
133     -# (at your option) any later version.
134     -#
135     -# This program is distributed in the hope that it will be useful,
136     -# but WITHOUT ANY WARRANTY; without even the implied warranty of
137     -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
138     -# GNU General Public License for more details.
139     -#
140     -# You should have received a copy of the GNU General Public License
141     -# along with this program; if not, write to the Free Software
142     -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
143     -#
144     -# Technical support for this program is available from Mitel Networks
145     -# Please visit our web site www.mitel.com for details.
146     -#----------------------------------------------------------------------
147     -
148     -exec 2>&1
149     -# Remove old pid file if one exists
150     -rm -f /var/run/ntpd.pid
151     -
152     -test -f /etc/ntp.conf || /sbin/e-smith/expand-template /etc/ntp.conf
153     -
154     -# Run ntpdate so we're not way off on startup.
155     -ntpstep=/etc/ntp/step-tickers
156     -tickers=`/bin/sed -e 's/\#.*$//g' $ntpstep`
157     -/usr/sbin/ntpdate -b -p 8 $tickers
158     -
159     -MEM="`head -1 ./env/MEMLIMIT`"
160     -exec /usr/local/bin/softlimit -m ${MEM} \
161     - ntpd -n -l /dev/stdout

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