summaryrefslogtreecommitdiff
blob: 3074f132aaa7658796acbfc6c8dcde80e30b95fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/sh

if [ -x /usr/bin/updatedb ]
then
	if [ -f /etc/updatedb.conf ]
	then
	    args=""
	else
	    args="-f proc"
	fi

	if [ -f /etc/mlocate-cron.conf ]
	then
		. /etc/mlocate-cron.conf
	fi

	# run on active process in case ionice isnt installed, or
	# system is really old and ionice doesnt work ...
	ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} -p $$ 2>/dev/null

	nice -n ${NICE:-10} /usr/bin/updatedb ${args}
fi