#!/bin/sh set -o errexit # First argument of this script is the package name # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list # Applying patches (if any) apply_patches ${1} hv_groupadd fcron hv_useradd -c fcron -g fcron fcron cd ${LFS_TMP}/${1} ./configure \ --with-sendmail \ --with-answer-all=no make make install 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/vi 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 cat > /etc/fcron/configure << "EOF" #!/bin/sh fcrontab -c /etc/fcron/fcron.conf /etc/fcron/fcrontab 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_rcS fcron 95 84 exit $?