> On Sun, Dec 28, 2008 at 1:39 PM, Denny White <denny...@cableone.net> wrote:
> 
> > "Not installing locate database; zero size"
> 
On Sun, Dec 28, 2008 at 05:54:31PM -0500, Dave K spoke thusly:
>
> I've been seeing this on a 4.3 box.  After reading your email, and
> seeing that I'm not the only one with the issue, I've been playing
> with it today.
> 
> After making backups of all the scripts involved (/etc/weekly and
> /usr/libexec/locate.*), I took out the "2> /dev/null" and "trap ..."
> stuff to be able to see all the errors, and have the various temporary
> file left behind for analysis.
> 
> If I run it manually (as root, "sh /etc/weekly"), it fails with the
> find in locate.updatedb giving the error "find: .:: Permission
> denied".  If I cd into /tmp first, it runs okay.  So I added
> "PREVPWD=$PWD; cd /tmp" in /etc/weekly before the call to
> locate.updatedb, and "cd $PREVPWD: after.
> 
> It now has run successfully both when invoked manually, and from cron.
> 
> I'm going to leave this debug configuration in place to see what
> happens as time goes on.
> 
> -- 
> Dave K
> Unix Systems & Network Administrator
> Mount Laurel NJ

Thanks Dave & Philip, too, since I'm CC you, for the ideas and help.
Y'all will probably want to kick me in the ass when I explain what
was causing the problem. But, your messages helped me figure it out,
none the less, especially the part about changing directories before
running the command. When I recently went from 4.3 to 4.4 & installed
a new crontab, I copied & pasted my own & root's stuff into their
respective crontabs from a backup. Wrong backup! There was 1 changed
line that I never noticed until I read your messages. The crontab for
root had HOME=/root & I can't remember why in the hell I changed that
one day farting around with something here. Long & the short is, I
copied from the wrong backup. I just changed it back to HOME=/var/log
& locate.updatedb from weekly works fine once again. My bad. I keep
voluminous notes  but that one just slipped through the cracks.
Sorry for the noise, & thanks for the help.
[Slinks back into the primordial newbie/troll slime ;)]


Denny White

-- 

 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII.
===============================================================
GnuPG key  : 0x1644E79A  |  http://wwwkeys.nl.pgp.net
Fingerprint: D0A9 AD44 1F10 E09E 0E67  EC25 CB44 F2E5 1644 E79A
===============================================================

Reply via email to