1 |
pva 09/04/05 19:34:37 |
2 |
|
3 |
Modified: vzctl-3.0.23-cronjobs-issue-warning.patch |
4 |
Added: vzctl-3.0.23-cronjobs-dstdir-check.patch |
5 |
vzctl-3.0.23-multiple-cron-jobs.patch |
6 |
vzctl-3.0.23-cronjobs-wightspace.patch |
7 |
vzctl-3.0.23-cronjobs-multiple-cron-jobs.patch |
8 |
Removed: vzctl-3.0.23-cronjobs-typo-fix.patch |
9 |
Log: |
10 |
Upstream accepted patches merged back, some other bits rewritten as they asked us. |
11 |
(Portage version: 2.2_rc28/cvs/Linux i686) |
12 |
|
13 |
Revision Changes Path |
14 |
1.2 sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-issue-warning.patch |
15 |
|
16 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-issue-warning.patch?rev=1.2&view=markup |
17 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-issue-warning.patch?rev=1.2&content-type=text/plain |
18 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-issue-warning.patch?r1=1.1&r2=1.2 |
19 |
|
20 |
Index: vzctl-3.0.23-cronjobs-issue-warning.patch |
21 |
=================================================================== |
22 |
RCS file: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-issue-warning.patch,v |
23 |
retrieving revision 1.1 |
24 |
retrieving revision 1.2 |
25 |
diff -u -r1.1 -r1.2 |
26 |
--- vzctl-3.0.23-cronjobs-issue-warning.patch 31 Mar 2009 09:16:33 -0000 1.1 |
27 |
+++ vzctl-3.0.23-cronjobs-issue-warning.patch 5 Apr 2009 19:34:37 -0000 1.2 |
28 |
@@ -1,22 +1,23 @@ |
29 |
-commit 5f0d3dbcdb5f1f1f9d019619c4e3dd3b2f2d29f3 |
30 |
+commit f576ed041ccd50b1e87e0adf4a0774c2de6a5264 |
31 |
Author: Peter Volkov <pva@g.o> |
32 |
-Date: Tue Mar 31 12:31:01 2009 +0400 |
33 |
+Date: Sun Apr 5 21:51:01 2009 +0400 |
34 |
|
35 |
Issue warning if cronjobs aren't automatically set |
36 |
|
37 |
Init script is supposed to set cronjobs automatically on start and remove |
38 |
them on stop. This works only with cron daemons that may hook at runtime |
39 |
scripts at ${DST_CRONSCRIPT_DIR} (e.g. sys-process/vixie-cron can). For |
40 |
- other cron daemons it's safer to warn users to set cronjobs manually. |
41 |
+ other cron daemons it's safer to warn users and ask them to set cronjobs |
42 |
+ manually. |
43 |
|
44 |
diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in |
45 |
-index 97ea313..dc87d41 100755 |
46 |
+index 8836768..465fab2 100755 |
47 |
--- a/etc/init.d/vz-gentoo.in |
48 |
+++ b/etc/init.d/vz-gentoo.in |
49 |
-@@ -57,7 +57,19 @@ check_config() { |
50 |
- setup_cron() |
51 |
+@@ -58,7 +58,23 @@ setup_cron() |
52 |
{ |
53 |
[ -z "$SRC_CRONSCRIPT_DIR" ] && return |
54 |
+ [ -d "$SRC_CRONSCRIPT_DIR" ] || return |
55 |
- [ -d "$DST_CRONSCRIPT_DIR" ] || return |
56 |
+ if [ ! -d "${DST_CRONSCRIPT_DIR}" ]; then |
57 |
+ if [ "x${SKIP_CRON_WARNINGS}" != "xyes" ]; then |
58 |
@@ -24,13 +25,17 @@ |
59 |
+ ewarn "\${DST_CRONSCRIPT_DIR} (${DST_CRONSCRIPT_DIR}) as a spool directory" |
60 |
+ ewarn "(e.g. sys-process/vixie-cron can). On your system ${DST_CRONSCRIPT_DIR}" |
61 |
+ ewarn "is not a directory even, thus you need manually set the following cron jobs:" |
62 |
-+ ewarn "*/5 * * * * root @PKGDATADIR@/scripts/vpsnetclean" |
63 |
-+ ewarn "*/5 * * * * root @PKGDATADIR@/scripts/vpsreboot" |
64 |
-+ ewarn "If you already did that and wish to avoid this warning put" |
65 |
++ echo |
66 |
++ grep -E -v '(^#|^$)' ${SRC_CRONSCRIPT_DIR}/vz* |
67 |
++ echo |
68 |
++ ewarn "Alternatevely, please, set cron execution of scripts inside ${SRC_CRONSCRIPT_DIR}" |
69 |
++ ewarn "so that modifications in those scripts be handled automatically." |
70 |
++ ewarn |
71 |
++ ewarn "If you already did that and wish to avoid this warning message put" |
72 |
+ ewarn "SKIP_CRON_WARNINGS=yes into /etc/conf.d/vz." |
73 |
+ fi |
74 |
+ return |
75 |
+ fi |
76 |
- install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ |
77 |
- $DST_CRONSCRIPT_DIR |
78 |
+ cat $SRC_CRONSCRIPT_DIR/vz* > $DST_CRONSCRIPT_DIR/vz && |
79 |
+ chmod 644 $DST_CRONSCRIPT_DIR/vz |
80 |
} |
81 |
|
82 |
|
83 |
|
84 |
1.1 sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-dstdir-check.patch |
85 |
|
86 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-dstdir-check.patch?rev=1.1&view=markup |
87 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-dstdir-check.patch?rev=1.1&content-type=text/plain |
88 |
|
89 |
Index: vzctl-3.0.23-cronjobs-dstdir-check.patch |
90 |
=================================================================== |
91 |
From: Kir Kolyshkin <kir@××××××.org> |
92 |
Date: Tue, 31 Mar 2009 12:05:53 +0000 (+0400) |
93 |
Subject: etc/init.d/vz*: check for DST_CRONSCRIPT_DIR |
94 |
X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=d4d3bca4052daaf265946159a71fc9ed16c33cb8 |
95 |
|
96 |
etc/init.d/vz*: check for DST_CRONSCRIPT_DIR |
97 |
|
98 |
Before commits df09d4ed and 00a5a95c we used 'install' to put the cronscript |
99 |
into DST_CRONSCRIPT_DIR (/etc/cron.d), and it was making sure that DST |
100 |
dir existed. |
101 |
|
102 |
Since we're now using 'cat' not 'install' we have to check for DST directory |
103 |
explicitly. More to say, if there's no /etc/cron.d/ than there's probably |
104 |
no sense to create it (crond is missing or smth). So just silently exit. |
105 |
|
106 |
Should fix http://bugzilla.openvz.org/1078 |
107 |
|
108 |
Reported-by: Peter Volkov <pva@g.o> |
109 |
Signed-off-by: Kir Kolyshkin <kir@××××××.org> |
110 |
--- |
111 |
|
112 |
diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in |
113 |
index b1a1a59..8836768 100755 |
114 |
--- a/etc/init.d/vz-gentoo.in |
115 |
+++ b/etc/init.d/vz-gentoo.in |
116 |
@@ -58,6 +58,7 @@ setup_cron() |
117 |
{ |
118 |
[ -z "$SRC_CRONSCRIPT_DIR" ] && return |
119 |
[ -d "$SRC_CRONSCRIPT_DIR" ] || return |
120 |
+ [ -d "$DST_CRONSCRIPT_DIR" ] || return |
121 |
cat $SRC_CRONSCRIPT_DIR/vz* > $DST_CRONSCRIPT_DIR/vz && |
122 |
chmod 644 $DST_CRONSCRIPT_DIR/vz |
123 |
} |
124 |
@@ -66,6 +67,7 @@ remove_cron() |
125 |
{ |
126 |
[ -z "$SRC_CRONSCRIPT_DIR" ] && return |
127 |
[ -d "$SRC_CRONSCRIPT_DIR" ] || return |
128 |
+ [ -d "$DST_CRONSCRIPT_DIR" ] || return |
129 |
cat > $DST_CRONSCRIPT_DIR/vz <<EOF |
130 |
# DO NOT EDIT THIS FILE! |
131 |
# |
132 |
diff --git a/etc/init.d/vz-redhat.in b/etc/init.d/vz-redhat.in |
133 |
index a75c2b3..7733389 100755 |
134 |
--- a/etc/init.d/vz-redhat.in |
135 |
+++ b/etc/init.d/vz-redhat.in |
136 |
@@ -129,6 +129,7 @@ setup_cron() |
137 |
check_old_cron_files |
138 |
[ -z "$SRC_CRONSCRIPT_DIR" ] && return |
139 |
[ -d "$SRC_CRONSCRIPT_DIR" ] || return |
140 |
+ [ -d "$DST_CRONSCRIPT_DIR" ] || return |
141 |
cat $SRC_CRONSCRIPT_DIR/vz* > $DST_CRONSCRIPT_DIR/vz && |
142 |
chmod 644 $DST_CRONSCRIPT_DIR/vz |
143 |
} |
144 |
@@ -138,6 +139,7 @@ remove_cron() |
145 |
check_old_cron_files |
146 |
[ -z "$SRC_CRONSCRIPT_DIR" ] && return |
147 |
[ -d "$SRC_CRONSCRIPT_DIR" ] || return |
148 |
+ [ -d "$DST_CRONSCRIPT_DIR" ] || return |
149 |
cat > $DST_CRONSCRIPT_DIR/vz <<EOF |
150 |
# DO NOT EDIT THIS FILE! |
151 |
# |
152 |
|
153 |
|
154 |
|
155 |
1.1 sys-cluster/vzctl/files/vzctl-3.0.23-multiple-cron-jobs.patch |
156 |
|
157 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.23-multiple-cron-jobs.patch?rev=1.1&view=markup |
158 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.23-multiple-cron-jobs.patch?rev=1.1&content-type=text/plain |
159 |
|
160 |
Index: vzctl-3.0.23-multiple-cron-jobs.patch |
161 |
=================================================================== |
162 |
commit df09d4ede93d20ed755f0d97778be359182fbcc7 |
163 |
Author: Kir Kolyshkin <kir@××××××.org> |
164 |
Date: Tue Mar 31 16:02:45 2009 +0400 |
165 |
|
166 |
etc/init.d/vz-gentoo: add processing of multiple cron files |
167 |
|
168 |
This is an addition to commit 00a5a95c02c05e0070a1dd10b47c90b3715c9ff5 |
169 |
for gentoo initscript. The idea is to be able to have multiple cronjob |
170 |
files managed by initscript. |
171 |
|
172 |
The only problem is there's no update_cron task for Gentoo initscript. |
173 |
|
174 |
http://bugzilla.openvz.org/599 |
175 |
|
176 |
Signed-off-by: Kir Kolyshkin <kir@××××××.org> |
177 |
|
178 |
diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in |
179 |
index 5050005..b1a1a59 100755 |
180 |
--- a/etc/init.d/vz-gentoo.in |
181 |
+++ b/etc/init.d/vz-gentoo.in |
182 |
@@ -58,8 +58,8 @@ setup_cron() |
183 |
{ |
184 |
[ -z "$SRC_CRONSCRIPT_DIR" ] && return |
185 |
[ -d "$SRC_CRONSCRIPT_DIR" ] || return |
186 |
- install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ |
187 |
- $DST_CRONSCRIPT_DIR |
188 |
+ cat $SRC_CRONSCRIPT_DIR/vz* > $DST_CRONSCRIPT_DIR/vz && |
189 |
+ chmod 644 $DST_CRONSCRIPT_DIR/vz |
190 |
} |
191 |
|
192 |
remove_cron() |
193 |
@@ -70,8 +70,8 @@ remove_cron() |
194 |
# DO NOT EDIT THIS FILE! |
195 |
# |
196 |
# Contents of this file managed by /etc/init.d/vz script |
197 |
-# Master copy is $SRC_CRONSCRIPT_DIR/vz. |
198 |
-# Consult that file for documentation. |
199 |
+# Master copy is in $SRC_CRONSCRIPT_DIR/vz* file(s). |
200 |
+# Consult $SRC_CRONSCRIPT_DIR/vz* for documentation. |
201 |
EOF |
202 |
} |
203 |
|
204 |
|
205 |
|
206 |
|
207 |
1.1 sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-wightspace.patch |
208 |
|
209 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-wightspace.patch?rev=1.1&view=markup |
210 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-wightspace.patch?rev=1.1&content-type=text/plain |
211 |
|
212 |
Index: vzctl-3.0.23-cronjobs-wightspace.patch |
213 |
=================================================================== |
214 |
From: Kir Kolyshkin <kir@××××××.org> |
215 |
Date: Tue, 31 Mar 2009 11:39:17 +0000 (+0400) |
216 |
Subject: etc/init.d/*: whitespace fixes |
217 |
X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=b9be63ff5a33955ce80384523b4712b0b032d4b4 |
218 |
|
219 |
etc/init.d/*: whitespace fixes |
220 |
|
221 |
As per http://bugzilla.openvz.org/1078 |
222 |
|
223 |
Reported-by: Peter Volkov <pva@g.o> |
224 |
Signed-off-by: Kir Kolyshkin <kir@××××××.org> |
225 |
--- |
226 |
|
227 |
diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in |
228 |
index 005813f..5050005 100755 |
229 |
--- a/etc/init.d/vz-gentoo.in |
230 |
+++ b/etc/init.d/vz-gentoo.in |
231 |
@@ -56,17 +56,17 @@ check_config() { |
232 |
# being enabled or not. |
233 |
setup_cron() |
234 |
{ |
235 |
- [ -z "$SRC_CRONSCRIPT_DIR" ] && return |
236 |
- [ -d "$SRC_CRONSCRIPT_DIR" ] || return |
237 |
- install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ |
238 |
- $DST_CRONSCRIPT_DIR |
239 |
+ [ -z "$SRC_CRONSCRIPT_DIR" ] && return |
240 |
+ [ -d "$SRC_CRONSCRIPT_DIR" ] || return |
241 |
+ install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ |
242 |
+ $DST_CRONSCRIPT_DIR |
243 |
} |
244 |
|
245 |
remove_cron() |
246 |
{ |
247 |
- [ -z "$SRC_CRONSCRIPT_DIR" ] && return |
248 |
- [ -d "$SRC_CRONSCRIPT_DIR" ] || return |
249 |
- cat > $DST_CRONSCRIPT_DIR/vz <<EOF |
250 |
+ [ -z "$SRC_CRONSCRIPT_DIR" ] && return |
251 |
+ [ -d "$SRC_CRONSCRIPT_DIR" ] || return |
252 |
+ cat > $DST_CRONSCRIPT_DIR/vz <<EOF |
253 |
# DO NOT EDIT THIS FILE! |
254 |
# |
255 |
# Contents of this file managed by /etc/init.d/vz script |
256 |
diff --git a/etc/init.d/vz-redhat.in b/etc/init.d/vz-redhat.in |
257 |
index f311190..a75c2b3 100755 |
258 |
--- a/etc/init.d/vz-redhat.in |
259 |
+++ b/etc/init.d/vz-redhat.in |
260 |
@@ -70,7 +70,7 @@ if [ "${MODULES_DISABLED}" != "yes" ]; then |
261 |
fi |
262 |
IPT_MODULES="ip_tables ${IPTABLES} xt_tcpudp" |
263 |
if [ "${IPV6}" = "yes" ]; then |
264 |
- IPT_MODULES="${IPT_MODULES} ${IP6TABLES}" |
265 |
+ IPT_MODULES="${IPT_MODULES} ${IP6TABLES}" |
266 |
fi |
267 |
VZFS_MODULES="simfs" |
268 |
fi |
269 |
|
270 |
|
271 |
|
272 |
1.1 sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-multiple-cron-jobs.patch |
273 |
|
274 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-multiple-cron-jobs.patch?rev=1.1&view=markup |
275 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-multiple-cron-jobs.patch?rev=1.1&content-type=text/plain |
276 |
|
277 |
Index: vzctl-3.0.23-cronjobs-multiple-cron-jobs.patch |
278 |
=================================================================== |
279 |
From: Kir Kolyshkin <kir@××××××.org> |
280 |
Date: Tue, 31 Mar 2009 12:02:45 +0000 (+0400) |
281 |
Subject: etc/init.d/vz-gentoo: add processing of multiple cron files |
282 |
X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=df09d4ede93d20ed755f0d97778be359182fbcc7 |
283 |
|
284 |
etc/init.d/vz-gentoo: add processing of multiple cron files |
285 |
|
286 |
This is an addition to commit 00a5a95c02c05e0070a1dd10b47c90b3715c9ff5 |
287 |
for gentoo initscript. The idea is to be able to have multiple cronjob |
288 |
files managed by initscript. |
289 |
|
290 |
The only problem is there's no update_cron task for Gentoo initscript. |
291 |
|
292 |
http://bugzilla.openvz.org/599 |
293 |
|
294 |
Signed-off-by: Kir Kolyshkin <kir@××××××.org> |
295 |
--- |
296 |
|
297 |
diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in |
298 |
index 5050005..b1a1a59 100755 |
299 |
--- a/etc/init.d/vz-gentoo.in |
300 |
+++ b/etc/init.d/vz-gentoo.in |
301 |
@@ -58,8 +58,8 @@ setup_cron() |
302 |
{ |
303 |
[ -z "$SRC_CRONSCRIPT_DIR" ] && return |
304 |
[ -d "$SRC_CRONSCRIPT_DIR" ] || return |
305 |
- install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ |
306 |
- $DST_CRONSCRIPT_DIR |
307 |
+ cat $SRC_CRONSCRIPT_DIR/vz* > $DST_CRONSCRIPT_DIR/vz && |
308 |
+ chmod 644 $DST_CRONSCRIPT_DIR/vz |
309 |
} |
310 |
|
311 |
remove_cron() |
312 |
@@ -70,8 +70,8 @@ remove_cron() |
313 |
# DO NOT EDIT THIS FILE! |
314 |
# |
315 |
# Contents of this file managed by /etc/init.d/vz script |
316 |
-# Master copy is $SRC_CRONSCRIPT_DIR/vz. |
317 |
-# Consult that file for documentation. |
318 |
+# Master copy is in $SRC_CRONSCRIPT_DIR/vz* file(s). |
319 |
+# Consult $SRC_CRONSCRIPT_DIR/vz* for documentation. |
320 |
EOF |
321 |
} |