--- mlocate.cron 2007-07-08 12:26:09.000000000 +0200 +++ mlocate.cron 2008-09-06 20:31:22.000000000 +0200 @@ -4,8 +4,19 @@ then if [ -f /etc/updatedb.conf ] then - nice /usr/bin/updatedb + args="" else - nice /usr/bin/updatedb -f proc + 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