From: root Date: Sat, 7 Jan 2017 09:52:26 +0000 (+0100) Subject: saving uncommitted changes in /etc prior to emerge run X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=f1af21677c9fc32a252cccdebcb439ed7364faaf;p=config%2Fhelga%2Fetc.git saving uncommitted changes in /etc prior to emerge run --- diff --git a/cron.daily/mlocate b/cron.daily/mlocate index 51cb504..7f3252e 100755 --- a/cron.daily/mlocate +++ b/cron.daily/mlocate @@ -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}" diff --git a/updatedb.conf b/updatedb.conf index 41bc4ab..3501ee3 100644 --- a/updatedb.conf +++ b/updatedb.conf @@ -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.