[Lunar-commits] <moonbase> findutils: conf file support in updatedb cron job
Christian Krause
wookietreiber at lunar-linux.org
Wed May 11 14:01:55 CEST 2011
commit faca5761400e44c63ccbbd90d4a8c08ce0147772
Author: Christian Krause <wookietreiber at lunar-linux.org>
Date: Wed May 11 14:01:55 2011 +0200
findutils: conf file support in updatedb cron job
---
utils/findutils/cron.daily/makeupdatedb | 9 ---------
utils/findutils/cron.daily/updatedb | 14 ++++++++++++++
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/utils/findutils/cron.daily/makeupdatedb b/utils/findutils/cron.daily/makeupdatedb
deleted file mode 100644
index dca95b0..0000000
--- a/utils/findutils/cron.daily/makeupdatedb
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-LOCKFILE=/var/lock/makeupdatedb.lock
-[ -f $LOCKFILE ] && exit 0
-
-trap "{ rm -f $LOCKFILE; exit 255; }" EXIT
-touch $LOCKFILE
-updatedb
-exit 0
diff --git a/utils/findutils/cron.daily/updatedb b/utils/findutils/cron.daily/updatedb
new file mode 100644
index 0000000..dee4285
--- /dev/null
+++ b/utils/findutils/cron.daily/updatedb
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+LOCKFILE=/var/lock/makeupdatedb.lock
+[ -f $LOCKFILE ] && exit 0
+
+# source settings for updatedb (e.g. prunefs and prunepaths)
+if [[ -f /etc/sysconfig/updatedb.conf ]] ; then
+ . /etc/sysconfig/updatedb.conf
+fi
+
+trap "{ rm -f $LOCKFILE; exit 255; }" EXIT
+touch $LOCKFILE
+updatedb
+exit 0
More information about the Lunar-commits
mailing list