#!/bin/sh # Converts /etc/config.d/cron to the files needed for fcron # fcron = http://fcron.free.fr/ . /etc/config.d/cron file=/tmp/cron.$$ if [ -e $file ] then rm -rf $file fi idx=1 while [ "$idx" -le "$CRON_N" ] do eval time='$CRON_'$idx'_TIMES' eval command='$CRON_'$idx'_COMMAND' echo "$time $command" >> $file idx=`expr $idx + 1` done if [ $CRON_N -eq "0" ] then touch $file fi cd /var/cron/etc mkdir -p root # fm: create if not already exists cat root/* >> $file 2>/dev/null fcrontab - -u root < $file rm -f $file for user in * do case $user in root) ;; # see above *) cat $user/* 2>/dev/null | fcrontab - -u $user ;; esac done