--- mlocate.cron 2008-09-06 13:58:30.000000000 +0200 +++ mlocate.cron.new 2008-09-06 14:02:58.000000000 +0200 @@ -4,8 +4,15 @@ then if [ -f /etc/updatedb.conf ] then - nice /usr/bin/updatedb + . /etc/updatedb.conf + args="" else - nice /usr/bin/updatedb -f proc + args="-f proc" 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