Magellan Linux

Contents of /trunk/man-db/man-db.cron

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1613 - (show annotations) (download)
Fri Jan 13 14:31:39 2012 UTC (12 years, 3 months ago) by niro
File size: 621 byte(s)
-files and patches for man-db
1 #! /bin/bash
2
3 if [ -e /etc/conf.d/man-db ]
4 then
5 source /etc/conf.d/man-db
6 fi
7
8 if [[ ${CRON} = no ]]
9 then
10 exit 0
11 fi
12
13 renice +19 -p $$ > /dev/null 2>&1
14 ionice -c3 -p $$ > /dev/null 2>&1
15
16 LOCKFILE="/run/lock/man-db.lock"
17
18 # the lockfile is not meant to be perfect, it's just in case the
19 # two man-db cron scripts get run close to each other to keep
20 # them from stepping on each other's toes. The worst that will
21 # happen is that they will temporarily corrupt the database
22 [ -f $LOCKFILE ] && exit 0
23
24 trap "{ rm -f ${LOCKFILE}; exit 255; }" EXIT
25 touch ${LOCKFILE}
26
27 # create/update the mandb database
28 mandb ${OPTS}
29
30 exit 0