OpenVZ Forum


Home » Mailing lists » Users » PATCH for small cron prob. in /etc/init.d/vz
PATCH for small cron prob. in /etc/init.d/vz [message #23562] Sat, 17 November 2007 07:06 Go to previous message
proto is currently offline  proto
Messages: 2
Registered: November 2007
Junior Member
The init script in vzctl-3.0.18 installs the file:
  /etc/cron.d/vz
as part of its startup,  what is strange as that on CentOS5 at least the 
last mod of the folder /etc/cron.d is NOT updated!

What this means its that CRON does not know about the new file as as 
such does not run it.

Hope this info helps,
Gérald

Here is a quick patch to fix the prob:

--- /etc/init.d/vz_orig     2007-07-31 16:54:05.000000000 -0400
+++ /etc/init.d/vz  2007-11-17 01:56:30.000000000 -0500
@@ -131,6 +131,7 @@
        [ -d "$SRC_CRONSCRIPT_DIR" ] || return
        cat $SRC_CRONSCRIPT_DIR/vz* > $DST_CRONSCRIPT_DIR/vz && \
                chmod 644 $DST_CRONSCRIPT_DIR/vz
+       touch -m $DST_CRONSCRIPT_DIR
 }
 
 remove_cron()
 
Read Message
Read Message
Previous Topic: venet0: hw csum failure.
Next Topic: Reapplying an OS template
Goto Forum:
  


Current Time: Fri Jul 19 05:08:26 GMT 2024

Total time taken to generate the page: 0.02410 seconds