Package: slocate
Version: 3.1-1.1
Severity: wishlist
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu hardy ubuntu-patch
In Ubuntu, we've applied the attached patch to achieve the following:
* Use ionice. It looks for settings from
/etc/updatedb.conf and uses "best effort" class by default.
Quite the same for "nice", defaulting to "10".
(LP: #134692)
Cheers,
Michael
-- System Information:
Debian Release: lenny/sid
APT prefers hardy-updates
APT policy: (500, 'hardy-updates'), (500, 'hardy')
Architecture: i386 (i686)
Kernel: Linux 2.6.22-14-generic (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
diff -u slocate-3.1/debian/cron.daily slocate-3.1/debian/cron.daily
--- slocate-3.1/debian/cron.daily
+++ slocate-3.1/debian/cron.daily
@@ -4,9 +4,17 @@
then
if [ -f /etc/updatedb.conf ]
then
- /usr/bin/updatedb
+ . /etc/updatedb.conf
+ fi
+
+ # Adjust I/O priority of current process (default: best effort)
+ ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} -p $$
+
+ if [ -f /etc/updatedb.conf ]
+ then
+ nice -n ${NICE:-10} /usr/bin/updatedb
else
- /usr/bin/updatedb -f proc
+ nice -n ${NICE:-10} /usr/bin/updatedb -f proc
fi
chown root.slocate /var/lib/slocate/slocate.db
fi