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