- case ${ARG} in
- unchecked)
- # Do not run during dinstall
- if [[ -e ${LOCK_DAILY} ]]; then
- exit 0;
- fi
- # only run one cron.unchecked and also lock against hourly (newoverview)
- if ! lockfile -r8 ${LOCK_UNCHECKED} 2> /dev/null; then
- # log "aborting cron.unchecked because $LOCK_UNCHECKED has already been locked"
- exit 0
- fi
- TMPFILES="${TMPFILES} ${LOCK_UNCHECKED}"
- ;;
- dinstall)
- ;;
- hourly)
- ;;
- daily)
- ;;
- weekly)
- ;;
- monthly)
- ;;
- yearly)
- ;;
- *)
- error "Unknown arg ${ARG}"
- exit 42
- ;;
- esac
+ # If there is a precronscript function, we run it.
+ prefunc=$(type -t precronscript || echo "")
+ if [[ -n ${prefunc} ]] && [[ ${prefunc} = function ]]; then
+ precronscript
+ fi