View previous topic :: View next topic |
Author |
Message |
coplaniuk Guru
Joined: 14 Apr 2004 Posts: 461 Location: Philadelphia, USA
|
Posted: Fri Sep 22, 2006 2:24 pm Post subject: slocate db update without cron |
|
|
I originally touched on this issue in this thread. But I'm still having problems. I added a command to my local.start file like this:
And I assumed it was working. I assumed it was updating my locate database at startup. But apparently it hasn't been working as I keep getting errors that the slocate database is more than 8 days old.
How would you recommend getting slocate to update its database at startup without a cron daemon? It's only a laptop for desktop usage...so I'd like not to run a cron daemon.
As an added bonus...it would be helpful if it only updated the database if the DB was 24 hours (or greater) old. _________________ -- Coplan
~/ Outland - Art, Music, PHP and Hidden Corners of the Web
-{ Embrace Life. Evolve your computer. Emerge Gentoo. }- |
|
Back to top |
|
|
wynn Advocate
Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Fri Sep 22, 2006 2:38 pm Post subject: |
|
|
I don't think you can background jobs until you have logged in: perhaps there is a way, some things say "backgrounding..." but by running anacron you should get the best of both worlds.
slocate installs Code: | /etc/cron.daily:
total 12
4 drwxr-xr-x 2 root root 4096 Sep 9 18:37 ./
4 drwxr-xr-x 57 root root 4096 Sep 22 14:21 ../
0 -rw-r--r-- 1 root root 0 Sep 9 16:46 .keep
4 -rwxr-xr-x 1 root root 152 Sep 9 18:37 slocate* | Running anacron, /etc/anacrontab is Code: | SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# format: period delay job-identifier command
1 5 cron.daily run-parts /etc/cron.daily
7 10 cron.weekly run-parts /etc/cron.weekly
30 15 cron.monthly run-parts /etc/cron.monthly | so cron.daily and, therefore, slocate, will be run once a day and you won't have cron running continuously. _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Fri Sep 22, 2006 4:45 pm Post subject: |
|
|
Moved from Installing Gentoo to Other Things Gentoo.
Not about getting gentoo installed, so moved here. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
coplaniuk Guru
Joined: 14 Apr 2004 Posts: 461 Location: Philadelphia, USA
|
Posted: Wed Sep 27, 2006 1:46 pm Post subject: |
|
|
I'll try anacron. Was relucant to try it...but I optimized my computer now, so I don't know that it'll make a performance difference. _________________ -- Coplan
~/ Outland - Art, Music, PHP and Hidden Corners of the Web
-{ Embrace Life. Evolve your computer. Emerge Gentoo. }- |
|
Back to top |
|
|
|