Re: How to run script (sleep360) without delaying bootup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 22 April 2007 20:18, Steven W. Orr wrote:
> On Sunday, Apr 22nd 2007 at 19:23 +0200, quoth Nigel Henry:
>
> =>On Sunday 22 April 2007 18:25, Mail List wrote:
> =>> On Sunday 22 April 2007 11:11:29 am Nigel Henry wrote:
> =>> > it has a "sleep 360" in the script, it justs hangs the bootup for 6
> mins =>> > until the script has run to completion. Script below.
> =>>
> =>>   Did you try something like
> =>>    nohup your-script > /path/tolog 2>&1 &
> =>
> =>No, but I'm very new to scripting.
> =>
> =>A little help please. How would I set this up in /etc/rc.d/rc.local? That
> is =>using the script that I previously posted.
> =>
> =>The script wants to be started from /etc/rc.d/rc.local, but doesn't want
> to =>delay the bootup, which will nullify running the script.
> =>
> =>The script path is: /usr/local/bin/ntp-restart
> =>
> =>Nigel.
>
> It's hard to follow this, but I think you'resaying that you added a line
> to rc.local that says
>
> /usr/local/bin/ntp-restart
>
> Just say:
>
> /usr/local/bin/ntp-restart &
>
> which will cause the command to background itself. Boot will proceed and
> the content of the script will execute the sleep while the rest of the
> boot continues. After the sleep ends, the rest of the script will proceed.
>
> Make sense?

Well that works just fine. First tried in user space on on the CLI. and it 
returned a command prompt immediately. then added it to 
>/etc/rc.d/rc.local

Reboot, and once booted up, connect to the Internet, then run ntpq> pe, and 
all 6 Internet time servers are listed. it obviously works. thanks a bunch.

I'd still like to get this working automatically though. Ideally a script that 
will ping an Internet server, and when a positive response is received, will 
run /usr/local/bin/ntp-restart. That way I can press the start button, and go 
upstairs to make a cup of tea/coffee, then come back down , and everything is 
up and running.

One step at a time though. Thanks for the help. It's fixed one problem.

Nigel.





[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux