UmVirt LFS Package info

DB commit: 57bed5a54ba91b88b24a1c8eb97bd083dbf72f0d
APP commit: 634ff2193dea70dde75eb1916d758638b7417453

fcron

The Fcron package contains a periodical command scheduler which aims at replacing Vixie Cron.

Package info

Codename: fcron
Source file: fcron-3.2.1.src.tar.gz
Source directory: fcron-3.2.1
Package URL: https://umvirt.com/linux/downloads/0.2/packages/f/fcron-3.2.1.src.tar.gz
Package md5-checksum URL: https://umvirt.com/linux/downloads/0.2/packages/f/fcron-3.2.1.src.tar.gz.md5sum
Dependances: Linux-PAM.
Dependance of: *** NO PACKAGES FOUND ***
Patches: *** NO PATCHES FOUND ***
Addons: *** NO ADDONS FOUND ***
Nestings *** NO NESTINGS FOUND ***
Configuration script:
groupadd -g 22 fcron &&
useradd -d /dev/null -c "Fcron User" -g fcron -s /bin/false -u 22 fcron

find doc -type f -exec sed -i 's:/usr/local::g' {} \;

./configure --prefix=/usr          \
            --sysconfdir=/etc      \
            --localstatedir=/var   \
            --without-sendmail     \
            --with-piddir=/run     \
            --with-boot-install=no

Build script:
make

Install script:
make install

cat > /usr/bin/run-parts << "EOF" &&
#!/bin/sh
# run-parts:  Runs all the scripts found in a directory.
# from Slackware, by Patrick J. Volkerding with ideas borrowed
# from the Red Hat and Debian versions of this utility.

# keep going when something fails
set +e

if [ \$# -lt 1 ]; then
  echo "Usage: run-parts "
  exit 1
fi

if [ ! -d \$1 ]; then
  echo "Not a directory: \$1"
  echo "Usage: run-parts "
  exit 1
fi

# There are several types of files that we would like to
# ignore automatically, as they are likely to be backups
# of other scripts:
IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"

# Main loop:
for SCRIPT in \$1/* ; do
  # If this is not a regular file, skip it:
  if [ ! -f \$SCRIPT ]; then
    continue
  fi
  # Determine if this file should be skipped by suffix:
  SKIP=false
  for SUFFIX in \$IGNORE_SUFFIXES ; do
    if [ ! "\$(basename \$SCRIPT \$SUFFIX)" = "\$(basename \$SCRIPT)" ]; then
      SKIP=true
      break
    fi
  done
  if [ "\$SKIP" = "true" ]; then
    continue
  fi
  # If we've made it this far, then run the script if it's executable:
  if [ -x \$SCRIPT ]; then
    \$SCRIPT || echo "\$SCRIPT failed."
  fi
done

exit 0
EOF
chmod -v 755 /usr/bin/run-parts


install -vdm754 /etc/cron.{hourly,daily,weekly,monthly}

cat > /var/spool/fcron/systab.orig << "EOF"
&bootrun 01 * * * * root run-parts /etc/cron.hourly
&bootrun 02 4 * * * root run-parts /etc/cron.daily
&bootrun 22 4 * * 0 root run-parts /etc/cron.weekly
&bootrun 42 4 1 * * root run-parts /etc/cron.monthly
EOF

systemctl enable fcron

systemctl start fcron &&
fcrontab -z -u systab