/[pkgs]/rpms/man/devel/makewhatis.crondaily
ViewVC logotype

Contents of /rpms/man/devel/makewhatis.crondaily

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Mon Apr 20 19:47:40 2009 UTC (7 months ago) by lkundrak
Branch: MAIN
CVS Tags: man-1_6f-20_fc12, man-1_6f-22_fc12, man-1_6f-23_fc13, man-1_6f-19_fc12, F-12-split, man-1_6f-18_fc12, man-1_6f-21_fc12, HEAD
Changes since 1.4: +9 -1 lines
* Sun Apr 19 2009 Lubomir Rintel <lkundrak@v3.sk> - 1.6f-18
- Get rid of slow weekly updates
- Make daily updates reliable
- Speed up initial indexation
1 #!/bin/bash
2
3 LOCKFILE=/var/lock/makewhatis.lock
4
5 # the lockfile is not meant to be perfect, it's just in case the
6 # two makewhatis cron scripts get run close to each other to keep
7 # them from stepping on each other's toes. The worst that will
8 # happen is that they will temporarily corrupt the database...
9 [ -f $LOCKFILE ] && exit 0
10
11 # if MAKEWHATISDBUPDATES variable is set to "n" or "N", then the
12 # update will not passed
13
14 MDU=`sed -n -e 's/^[[:blank:]]*MAKEWHATISDBUPDATES[[:blank:]]*\(.\)[[:blank:]]*$/\1/p' < /etc/man.config`
15 ([ "$MDU" == "n" ] || [ "$MDU" == "N" ]) && exit 0
16
17 trap "{ rm -f $LOCKFILE ; exit 255; }" EXIT
18 touch $LOCKFILE
19 # Rebuild the database if makewhatis was since last full run,
20 # otherwise just update with new pages
21 if [ ! -f /var/cache/man/whatis ] ||
22 find /usr/sbin/makewhatis -newer /var/cache/man/whatis |grep -q .
23 then
24 makewhatis -w
25 else
26 makewhatis -U -w
27 fi
28 exit 0

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2