Subject: bin/13302: disabling weekly locatedb rebuild still yields output
To: None <gnats-bugs@gnats.netbsd.org>
From: None <nocturne@arepa.com>
List: netbsd-bugs
Date: 06/25/2001 02:07:30
>Number: 13302
>Category: bin
>Synopsis: disabling weekly locatedb rebuild still yields output
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 24 23:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Eric Mumpower
>Release: Stock NetBSD 1.5 <NetBSD-current source date>
>Organization:
Arepa.com
>Environment:
System: NetBSD floyd.arepa.com 1.5 NetBSD 1.5 (FLOYD) #2: Wed May 9 12:13:16 EDT 2001 nocturne@floyd.arepa.com:/usr/src/sys/arch/i386/compile/FLOYD i386
>Description:
Even if you set rebuild_locatedb to NO in /etc/weekly.conf, the
/etc/weekly script will output the text "Not rebuilding locate
database; no /var/db/locate.database" each week, in stock NetBSD 1.5 .
This is bogus; no text should be echoed (which sends useless mail to
root) if this feature has been deliberately disabled.
>How-To-Repeat:
if checkyesno rebuild_locatedb && [ -f /var/db/locate.database ]; then
echo "Rebuilding locate database:"
chmod 644 /var/db/locate.database
chown nobody:nobody /var/db/locate.database
nice -5 su -m nobody -c /usr/libexec/locate.updatedb 2>/dev/null
chown root:wheel /var/db/locate.database
else
echo "Not rebuilding locate database; no /var/db/locate.database"
fi
>Fix:
I would suggest, roughly:
if checkyesno rebuild_locatedb; then
if [ -f /var/db/locate.database ]; then
echo "Rebuilding locate database:"
chmod 644 /var/db/locate.database
chown nobody:nobody /var/db/locate.database
nice -5 su -m nobody -c /usr/libexec/locate.updatedb 2>/dev/null
chown root:wheel /var/db/locate.database
else
echo "Not rebuilding locate database; no /var/db/locate.database"
fi
fi
>Release-Note:
>Audit-Trail:
>Unformatted: