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
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"
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
# script-name start stop
bootscript_add_rcsysinit fcron 95 84
+
+ install -v -m644 ${SCRDIR}/misc/fcron.d/* /etc/fcron/fcron.d
}