How to run script (sleep360) without delaying bootup

Scott Berry sberry at northlc.com
Sun Apr 22 16:19:01 UTC 2007


Nigel, what would you want to ping?  I think you could put a line in that 
script to do that.

Scott

----- Original Message ----- 
From: "Nigel Henry" <cave.dnb at tiscali.fr>
To: <fedora-list at redhat.com>
Sent: Sunday, April 22, 2007 10:11 AM
Subject: How to run script (sleep360) without delaying bootup


> Ntpd on my FC2 install has a problem when no dialup connection is 
> available at
> bootup, but does handle this well on FC6.
>
> I have a script in the ntp tarball named ntp-restart which appears to do 
> what
> I want, but if I make an entry in /etc/rc.d/rc.local to run it, and as 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.
>
> #!/bin/sh
> #
> # This script can be used to kill and restart the NTP daemon. Edit the
> # /usr/local/bin/ntpd line to fit.
> #
> kill -INT `ps -ax | egrep "ntpd" | egrep -v "egrep" | sed
> 's/^\([ 0-9]*\) .*/\1'/`
> sleep 360           #changed from 10
> /usr/local/bin/ntpd -g
> /usr/local/bin/ntp-wait
> exit 0
>
> What I need is a way to run this script, either at, or after bootup, but
> automatically. This would give me enough time after bootup, and logging 
> in,
> to make the Internet connection. Bear in mind that it needs to run as 
> root,
> otherwise I could put something in KDE's autostart directory to run it.
>
> Ideally of course would be a script to ping an IP address out there in the 
> big
> wide world, and when it gets a positive response, would run the 
> ntp-restart
> script, which then could be reset to "sleep 10", as a 6 min delay would 
> not
> be necessary.
>
> Any ideas folks? All suggestions, as usual, very gratefully received.
>
> Nigel.
>
> -- 
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.463 / Virus Database: 269.5.7/771 - Release Date: 4/21/2007 
> 11:56 AM
>
> 




More information about the users mailing list