#!/bin/bash hvconfig_pre() { 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 if [ ! -f ${DUMMY_SM_PATH} ]; then DUMMY_SM=yes touch ${DUMMY_SM_PATH} chmod 755 ${DUMMY_SM_PATH} fi CONFIGURE_OPTS+=" \ --with-editor=/usr/bin/nano \ --with-boot-install=no \ --with-answer-all=no" } hvbuild_post() { if [ "x${DUMMY_SM}" = "xyes" ]; then rm ${DUMMY_SM_PATH} fi rm -f /etc/fcron.conf mkdir -p /etc/fcron mv -f /etc/fcron.allow /etc/fcron mv -f /etc/fcron.deny /etc/fcron cat > /etc/fcron/fcron.conf << "EOF" # fcron.conf - Configuration file for fcron(8) and fcrontab(1). # See fcron.conf(5) for syntax and explanations. # # WARNING : this file must be owned by root:fcron and 640. # # # The spool directory where fcron stores its files fcrontabs = /var/spool/fcron # # The locations of the pid file and the fifo file pidfile = /var/run/fcron.pid fifofile = /var/run/fcron.fifo # # allow/deny files to determine which users are allowed to use fcrontab fcronallow = /etc/fcron/fcron.allow fcrondeny = /etc/fcron/fcron.deny # # Location of the programs used by fcron shell = /bin/sh sendmail = /usr/sbin/sendmail # # Location of the default editor for "fcrontab -e" editor = /usr/bin/nano EOF chmod 640 /etc/fcron/fcron.conf install -v -d /var/spool/fcron chown fcron.fcron /var/spool/fcron cat > /etc/fcron/configure << "EOF" #!/bin/bash # Create empty file (or erase existing file) > /etc/fcron/fcron.tab 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 chmod 740 /etc/fcron/configure # Executing fcron configure script. /etc/fcron/configure install -v -m740 ${SCRDIR}/bootscripts/fcron /etc/rc.d/init.d # script-name start stop bootscript_add_rcsysinit fcron 95 84 install -v -m644 ${SCRDIR}/misc/fcron.d/* /etc/fcron/fcron.d }