Blame SOURCES/man-db.crondaily

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