X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage3%2Fcis-fcron;h=3abce90e40d5ad01e5d20295531ab63e46da00f7;hb=8c1ceecd26d41af612337eb87f51fa1d353d6c8a;hp=f83968d1cae5ec3cf06888950f02d81b35c00702;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage3/cis-fcron b/stage3/cis-fcron index f83968d..3abce90 100755 --- a/stage3/cis-fcron +++ b/stage3/cis-fcron @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -6,27 +8,25 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -hv_groupadd fcron && -hv_useradd -c fcron -g fcron fcron && +hv_groupadd fcron +hv_useradd -c fcron -g fcron fcron -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} ./configure \ --with-sendmail \ - --with-answer-all=no && -make && -make install && + --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 && +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" && +cat > /etc/fcron/fcron.conf << "EOF" # fcron.conf - Configuration file for fcron(8) and fcrontab(1). # See fcron.conf(5) for syntax and explanations. # @@ -51,32 +51,31 @@ sendmail = /usr/sbin/sendmail # Location of the default editor for "fcrontab -e" editor = /usr/bin/vi EOF -chmod 640 /etc/fcron/fcron.conf && +chmod 640 /etc/fcron/fcron.conf -cat > /etc/fcron/fcrontab << "EOF" && +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 && +chmod 640 /etc/fcron/fcrontab +chown -R root.fcron /etc/fcron -cat > /etc/fcron/configure << "EOF" && +cat > /etc/fcron/configure << "EOF" #!/bin/sh fcrontab -c /etc/fcron/fcron.conf /etc/fcron/fcrontab exit $? EOF -chmod 740 /etc/fcron/configure && +chmod 740 /etc/fcron/configure # Executing fcron configure script. -/etc/fcron/configure && +/etc/fcron/configure -install -v -m740 ${CUR_DIR}/bootscripts/fcron /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/fcron /etc/rc.d/init.d # script-name start stop bootscript_add_rcS fcron 95 84 -# Return last error exit $?