]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ramdisk: Move crontab back to disk
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Dec 2015 14:57:30 +0000 (14:57 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Dec 2015 14:57:30 +0000 (14:57 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/96/update.sh
src/initscripts/init.d/collectd
src/initscripts/init.d/fcron

index 7faf4b8191c814e576e2cfbf04e4ac6aae4b095a..764e6bf09efca85063e4e9e3531ac22eb45cdb53 100644 (file)
@@ -32,6 +32,7 @@ do
 done
 
 # Stop services
+/etc/init.d/fcron stop
 
 # Extract files
 extract_files
@@ -39,7 +40,14 @@ extract_files
 # Update Language cache
 # /usr/local/bin/update-lang-cache
 
+if [ -L "/var/spool/cron" ]; then
+       rm -f /var/spool/cron
+       mv /var/log/rrd/cron /var/spool/cron
+       chown cron:cron /var/spool/cron
+fi
+
 # Start services
+/etc/init.d/fcron start
 /etc/init.d/dnsmasq restart
 
 # This update need a reboot...
index a38b4f17fbc5ff08534d173eeb8396ce57f7b00d..24187d21583649ef684eba6bc4289d6482cffa13 100644 (file)
@@ -21,25 +21,13 @@ case "$1" in
                                fi
                                mount_ramdisk "$RRDLOG"
                                evaluate_retval
-                               #cleanup cron
-                               if [ -e $RRDLOG.bak/cron/new.root ]; then
-                                       if [ -e $RRDLOG.bak/cron/root ]; then
-                                               rm -f $RRDLOG.bak/cron/new.root
-                                       fi
-                               fi
+
                                #restore old values to ramdisk if exist
                                restore_ramdisk "$RRDLOG"
                        fi
                else
                        restore_ramdisk "$RRDLOG"
                fi
-                       #
-                       # Move /var/spool/cron to ramdisk and make a symlink
-                       #
-                       if [ ! -L /var/spool/cron ]; then
-                               mv /var/spool/cron /var/log/rrd/cron
-                               ln -s /var/log/rrd/cron /var/spool/cron
-                       fi
 
                # If run from init and collectd alrady started then exit silent
                if [ "$(basename $0)" != "collectd" ]; then
index 0260d4ad6279185f79f57485ff4e7b78b8f7655a..00a70bd4a370d7eb360b3d80f4289c7da7dee309 100644 (file)
@@ -13,7 +13,6 @@
 case "$1" in
        start)
                boot_mesg "Starting fcron..."
-               chown cron:cron /var/spool/cron
                loadproc /usr/sbin/fcron -y
                # remove -y to reenable fcron logging
                ;;