LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-31-2007, 02:16 PM   #1
randomsel
Member
 
Registered: Oct 2006
Location: Wilmington, DE
Distribution: Slackware 11
Posts: 201

Rep: Reputation: 30
How can I run updatedb @reboot as a background process?


How can I make uptadedb run as a background startup process?

If I add it to rc.local, it'll take a bit of time to finish running, and the boot-up process will be considerably longer.

I'd like to have something/someone else run it for me at startup, like cron, but slackware's crontab doesn't support @reboot like Vixie does (as said by THE MAN). Also, waiting for the daily cron job isn't an option because the machine gets turned off regularly (laptop, not server).

Thanks in advance
 
Old 01-31-2007, 02:22 PM   #2
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 732

Rep: Reputation: 173Reputation: 173
Try:

updatedb &

in rc.local -- that will background the process. You may need to put in the full path to updatedb.
 
Old 01-31-2007, 02:27 PM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291
I think you should still run it through cron.

But I think it's possible to background the process with

Code:
updatedb &
as long as it won't interfere with anything else.
 
Old 02-02-2007, 01:39 PM   #4
Michielvw
Member
 
Registered: May 2005
Location: Leicester,UK
Distribution: Slackware
Posts: 108

Rep: Reputation: 19
updatedb runs daily already through cron

Code:
[root]:[/etc/cron.daily]# crontab -l | grep daily
# Run daily cron jobs at 4:40 every day:
40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
[root]:[/etc/cron.daily]#
and the in /etc/cron.dialy is the script slocate
Code:
[root]:[/etc/cron.daily]# cat slocate
#!/bin/sh
/usr/bin/updatedb -c /etc/updatedb.conf
[root]:[/etc/cron.daily]#

so unless there is a reason to run it from rc.local (for example if the box gets shutdown every night) there shouldn't be much reason to run it on boot as well.
 
Old 02-02-2007, 03:36 PM   #5
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 732

Rep: Reputation: 173Reputation: 173
Quote:
Originally Posted by BlackPanther
so unless there is a reason to run it from rc.local (for example if the box gets shutdown every night) there shouldn't be much reason to run it on boot as well.
I think that's exactly the reason the OP gave: "Also, waiting for the daily cron job isn't an option because the machine gets turned off regularly (laptop, not server)."
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to run a process in the X background sh4d0w13 Linux - General 6 09-12-2005 02:54 PM
is there a system call to send process to run in the background? feetyouwell Programming 4 10-01-2004 04:58 AM
how to run any binary in background - background process tej Linux - Newbie 1 08-16-2004 12:27 AM
run process in background using system calls indian Programming 2 08-10-2004 05:03 PM
run process when reboot ust Linux - General 2 08-15-2003 01:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration