X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage3%2Fpkg%2Ffcron;h=6ecb6d5a821675151c03a1e39d4cc17e11d8959b;hb=1b6490195147ee6d1098cf255240d60f60c40108;hp=517298a616b1b837850d46a4308d9923204c80e6;hpb=3dae4c554ec18f465eb6ee5e6efdbdbe8557e13c;p=hvlinux.git diff --git a/stage3/pkg/fcron b/stage3/pkg/fcron index 517298a..6ecb6d5 100644 --- a/stage3/pkg/fcron +++ b/stage3/pkg/fcron @@ -2,8 +2,8 @@ hvconfig_pre() { - groupadd -f fcron - hv_useradd -c fcron -g fcron fcron + groupadd --system -f fcron + hv_useradd --system -c fcron -g fcron fcron # Create a dummy sendmail executable to fool fcron DUMMY_SM_PATH=/usr/sbin/sendmail @@ -13,7 +13,7 @@ hvconfig_pre() chmod 755 ${DUMMY_SM_PATH} fi - CONFIGURE_OPTS="${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --with-editor=/usr/bin/nano \ --with-boot-install=no \ --with-answer-all=no" @@ -57,21 +57,23 @@ editor = /usr/bin/nano EOF chmod 640 /etc/fcron/fcron.conf - cat > /etc/fcron/fcrontab << "EOF" -# &options min hrs day-of-month month day-of-week command -# Run rotatelogs every day at 00:05 -#&mail(false) 05 00 * * * /usr/local/bin/rotatelogs -EOF - chmod 640 /etc/fcron/fcrontab - chown -R root.fcron /etc/fcron - - install -d /var/spool/fcron + install -v -d /var/spool/fcron chown fcron.fcron /var/spool/fcron cat > /etc/fcron/configure << "EOF" -#!/bin/sh +#!/bin/bash + +# Create empty file (or erase existing file) +> /etc/fcron/fcron.tab -fcrontab -c /etc/fcron/fcron.conf /etc/fcron/fcrontab +for f in /etc/fcron/fcron.d/*; do + cat $f >> /etc/fcron/fcron.tab +done + +chown -R root:fcron /etc/fcron +chmod 640 /etc/fcron/fcron.tab + +fcrontab -c /etc/fcron/fcron.conf /etc/fcron/fcron.tab exit $? EOF @@ -84,4 +86,6 @@ EOF # script-name start stop bootscript_add_rcsysinit fcron 95 84 + + install -v -m644 ${SCRDIR}/misc/fcron.d/* /etc/fcron/fcron.d }