Blame SOURCES/man-db.crondaily

1be407
#!/bin/bash
1be407
1be407
if [ -e /etc/sysconfig/man-db ]; then
1be407
    . /etc/sysconfig/man-db
1be407
fi
1be407
1be407
if [ "$CRON" = "no" ]; then
1be407
   exit 0
1be407
fi
1be407
1be407
renice +19 -p $$ >/dev/null 2>&1
1be407
ionice -c3 -p $$ >/dev/null 2>&1
1be407
1be407
LOCKFILE=/var/lock/man-db.lock
1be407
1be407
# the lockfile is not meant to be perfect, it's just in case the
1be407
# two man-db cron scripts get run close to each other to keep
1be407
# them from stepping on each other's toes.  The worst that will
1be407
# happen is that they will temporarily corrupt the database
1be407
[[ -f $LOCKFILE ]] && exit 0
1be407
1be407
trap "{ rm -f $LOCKFILE ; exit 0; }" EXIT
1be407
touch $LOCKFILE
1be407
# create/update the mandb database
1be407
mandb $OPTS
1be407
1be407
exit 0