Package: findutils Version: 4.2.31-3 Severity: normal Tags: patch User: [EMAIL PROTECTED] Usertags: origin-ubuntu hardy ubuntu-patch
Hello! This patch allows the ionice values to be configured from the local customization file. -- Kees Cook @outflux.net
diff -u findutils-4.2.31/debian/locate-cron.daily findutils-4.2.31/debian/locate-cron.daily --- findutils-4.2.31/debian/locate-cron.daily +++ findutils-4.2.31/debian/locate-cron.daily @@ -21,19 +21,24 @@ # (this is relative to the default which cron sets, which is usually +5) NICE=10 -# Set the task to run with "idle" I/O priority if possible -# Linux supports io scheduling priorities and classes since -# 2.6.13 with the CFQ io scheduler - -if [ -x /usr/bin/ionice ]; then - ionice -c3 -p$$ -fi +# I/O priority +# 1 for real time, 2 for best-effort (3 for idle is only allowed for root!) +IONICE_CLASS=2 +# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest +IONICE_PRIORITY=7 # allow keeping local customizations in a separate file if [ -r /etc/updatedb.findutils.cron.local ] ; then . /etc/updatedb.findutils.cron.local fi -export FINDOPTIONS PRUNEFS PRUNEPATHS NETPATHS LOCALUSER NICE +export FINDOPTIONS PRUNEFS PRUNEPATHS NETPATHS LOCALUSER NICE IONICE_CLASS IONICE_PRIORITY + +# Set the task to run with desired I/O priority if possible +# Linux supports io scheduling priorities and classes since +# 2.6.13 with the CFQ io scheduler +if [ -x /usr/bin/ionice ]; then + ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} -p $$ +fi if getent passwd $LOCALUSER > /dev/null ; then cd / && nice -n ${NICE:-10} updatedb.findutils 2>/dev/null