Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Running makemandb on every boot
Alan Barrett <apb%cequrux.com@localhost> wrote:
|On Mon, 19 May 2014, Joerg Sonnenberger wrote:
|>The primary intention for running it on boot was to make sure that it
|>gets build after a new installation. Many systems don't run over night,
|>so they won't get the nightly or weekly run.
|
|Could we devise a better test for whether this is a new
|installation? Perhaps check whether the man db's timestamp is
|newer than /etc/mtree/set.man ?
Sorry for jumping in, but i have the following
--- makemandb.orig 2014-05-19 14:21:32.000000000 +0200
+++ makemandb 2014-05-19 14:49:15.000000000 +0200
@@ -17,6 +17,14 @@ stop_cmd=":"
makemandb_start()
{
+ if mandb=`/usr/bin/grep _mandb /etc/man.conf` &&
+ mandb=`echo ${mandb} | /usr/bin/cut -d ' ' -f 2` &&
+ [ -f "${mandb}" ]; then
+ eval `/usr/bin/stat -s "${mandb}"`
+ nowt=`/bin/date +%s`
+ difft=`/bin/expr ${nowt} - ${st_atime}`
+ [ ${difft} -lt 86400 ] && return
+ fi
# Initiate update build in the background
nice -n 5 /usr/sbin/makemandb -Q > /dev/null 2>&1 &
}
--steffen
Home |
Main Index |
Thread Index |
Old Index