# check the config file
NODEVS=""
if [ ! -f /etc/updatedb.conf ]; then
- NODEVS=$(< /proc/filesystems awk '$1 == "nodev" && $2 != "rootfs" { print $2 }')
+ NODEVS=$(awk '$1 == "nodev" && $2 != "rootfs" { print $2 }' /proc/filesystems)
fi
# alter the priority of the updatedb process
/usr/bin/ionice -c${IONICE_CLASS:-2} -n${IONICE_PRIORITY:-7} -p $$ > /dev/null 2>&1
fi
+# Cleanup old temp files from previous unsuccessful runs
+rm -f /var/lib/mlocate/mlocate.db.*
+
# run the updatedb if possible
if [ -x /usr/bin/updatedb ]; then
/usr/bin/updatedb -f "${NODEVS}"
# /etc/updatedb.conf: config file for slocate
-# $Id: updatedb.conf,v 1.6 2014/05/05 06:42:03 polynomial-c Exp $
+# $Id$
# This file sets variables that are used by updatedb.
# For more info, see the updatedb.conf(5) manpage.