]>
Commit | Line | Data |
---|---|---|
9eca7db9 MT |
1 | #! /bin/bash |
2 | ||
3 | renice +19 -p $$ >/dev/null 2>&1 | |
4 | ionice -c3 -p $$ >/dev/null 2>&1 | |
5 | ||
6 | LOCKFILE=/var/lock/man-db.lock | |
7 | ||
8 | # The lockfile is not meant to be perfect, it's just in case the | |
9 | # two man-db cron scripts get run close to each other to keep | |
10 | # them from stepping on each other's toes. The worst that will | |
11 | # happen is that they will temporarily corrupt the database. | |
12 | [ -f $LOCKFILE ] && exit 0 | |
13 | ||
14 | trap "{ rm -f $LOCKFILE ; exit 0; }" EXIT | |
15 | touch $LOCKFILE | |
16 | ||
17 | # Create/update the mandb database. | |
18 | mandb -q | |
19 | ||
20 | exit 0 |