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