| Line 13... |
Line 13... |
| 13 |
|
13 |
|
| 14 |
MDU=`sed -n -e 's/^[[:blank:]]*MAKEWHATISDBUPDATES[[:blank:]]*\(.\)[[:blank:]]*$/\1/p' < /etc/man.config`
|
14 |
MDU=`sed -n -e 's/^[[:blank:]]*MAKEWHATISDBUPDATES[[:blank:]]*\(.\)[[:blank:]]*$/\1/p' < /etc/man.config`
|
| 15 |
([ "$MDU" == "n" ] || [ "$MDU" == "N" ]) && exit 0
|
15 |
([ "$MDU" == "n" ] || [ "$MDU" == "N" ]) && exit 0
|
| 16 |
|
16 |
|
| 17 |
trap "{ rm -f $LOCKFILE ; exit 255; }" EXIT
|
17 |
trap "{ rm -f $LOCKFILE ; exit 255; }" EXIT
|
| 18 |
touch $LOCKFILE
|
18 |
touch $LOCKFILE; restorecon $LOCKFILE
|
| 19 |
# Rebuild the database if makewhatis was since last full run,
|
19 |
# Rebuild the database if makewhatis was since last full run,
|
| 20 |
# otherwise just update with new pages
|
20 |
# otherwise just update with new pages
|
| 21 |
if [ ! -f /var/cache/man/whatis ] ||
|
21 |
if [ ! -f /var/cache/man/whatis ] ||
|
| 22 |
find /usr/sbin/makewhatis -newer /var/cache/man/whatis |grep -q .
|
22 |
find /usr/sbin/makewhatis -newer /var/cache/man/whatis |grep -q .
|
| 23 |
then
|
23 |
then
|