Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8227 - slocate - cron script for locatedb
Summary: slocate - cron script for locatedb
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Will Woods (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-22 14:45 UTC by Markus Bertheau (RETIRED)
Modified: 2003-05-09 15:48 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Bertheau (RETIRED) gentoo-dev 2002-09-22 14:45:59 UTC
How about adding the following file to findutils?o
saphir root # cat /etc/cron.daily/slocate.cron 
#!/bin/sh
renice +19 -p $$ >/dev/null 2>&1
/usr/bin/updatedb -f "nfs,smbfs,ncpfs,proc,devpts,devfs,tmpfs" -e
"/tmp,/var/tmp,/usr/tmp,/afs,/net"
Comment 1 Markus Bertheau (RETIRED) gentoo-dev 2002-10-23 13:46:46 UTC
#!/bin/sh
renice +19 -p $$ >/dev/null 2>&1
/usr/bin/updatedb --prunefs='nfs smbfs ncpfs proc devpts devfs tmpfs' --prunepat
hs='/tmp /var/tmp /usr/tmp /afs /net /root/.ccache'

This one actually works.
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2002-10-25 17:54:31 UTC
Who is doing the crons ?  Think its Thilo Bangert <bangert@gentoo.org>, not
sure.
Comment 3 Markus Bertheau (RETIRED) gentoo-dev 2002-10-28 04:07:23 UTC
Add iso9660 to prunefs :)
Comment 4 Will Woods (RETIRED) gentoo-dev 2002-11-11 17:04:36 UTC
The script probably should not index /home and /root by default. 
It's a bad idea to let all users be able to see the contents of everyone 
(including root)'s home directories. 
 
It's probably a good idea to ignore /mnt as well, since those are temporarily 
mounted filesystems. 
 
Also, consider ignoring /var/spool, or at least mail spools -     
/var/qmail/queue, /var/spool/postfix, /var/spool/mail, etc.    
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2002-12-12 15:47:11 UTC
ska: wanna fix this before we add it?
Comment 6 Aron Griffis (RETIRED) gentoo-dev 2003-04-11 17:58:26 UTC
This bug is aging...  Anyway, note that it should be applied to slocate, not findutils, since findutils will no longer be supplying updatedb.  See bug 18729
Comment 7 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2003-04-12 08:44:52 UTC
perhaps we can  merge the existing cronscript into the suggestions above... 
 
actually i am in favor of creating an updatedb.conf so that we get rid of the annoying 
"missing /etc/updatedb.conf" message in the case a user run updatedb manually... 
 
yatze home # updatedb 
warning: updatedb: could not access /etc/updatedb.conf: open: No such file or 
directory 
 
this is what the existing slocate.cron looks like: 
yatze cron.daily # cat slocate.cron 
#! /bin/sh 
 
if [ -x /usr/bin/updatedb ] 
then 
        if [ -f /etc/updatedb.conf ] 
        then 
                /usr/bin/updatedb 
        else 
                /usr/bin/updatedb -f proc 
        fi 
fi 
 
 
i may be putting some more effort into this later this week... 
 
any other paths people wouldn't want in the slocate db? 
also note: slocate only shows files which are readable by the user - so indexing 
/home and /root is OK... 
 
best regards 
Thilo 
Comment 8 Brett Simpson 2003-04-17 15:56:13 UTC
Please add ncpfs to prunefs. :-) 
Comment 9 Martin Holzer (RETIRED) gentoo-dev 2003-05-09 15:48:38 UTC
all fixed with latest findutils and slocate