]> Frank Brehm's Git Trees - config/helga/etc.git/commitdiff
saving uncommitted changes in /etc prior to emerge run
authorroot <root@helga.brehm-online.com>
Sat, 7 Jan 2017 09:52:26 +0000 (10:52 +0100)
committerroot <root@helga.brehm-online.com>
Sat, 7 Jan 2017 09:52:26 +0000 (10:52 +0100)
cron.daily/mlocate
updatedb.conf

index 51cb504977e2ce59d4ff0cc95422604bef4d25bd..7f3252e9cc769244735d0791f6b5e4297aebfb2e 100755 (executable)
@@ -28,7 +28,7 @@ fi
 # 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
@@ -39,6 +39,9 @@ if [ -x /usr/bin/ionice ] && /usr/bin/ionice -c3 true 2>/dev/null; then
        /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}"
index 41bc4ab5e889dcf57d52467cf7a621ec612a0047..3501ee30163dbac87dcb044552a3cc9f3e84cad0 100644 (file)
@@ -1,5 +1,5 @@
 # /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.