[LinuxPPS] Patch to make ppsldisc to 'go away' after 60 sec.

Rodolfo Giometti giometti at enneenne.com
Tue Aug 26 22:00:28 CEST 2008


On Tue, Aug 26, 2008 at 10:24:55AM -0600, clemens at dwf.com wrote:
> After 'playing' with ntp for a while, and starting and restarting it,
> I find that I have half a dozen ppsldisc's running.
> If anything this is irritating,- and is probably why I reported that
> I was having problems with -rc4.
> 
> In any case, here is what I do locally.
>     1) compile ppsldisc.c and put it in /usr/local/bin
>     2) modify the /etc/rc.d/init.d/ntpd startup file, and where it says
> 
>         # Start daemon.
>         echo -n "Starting ntpd: "
>         daemon $NTPD -c $ntpconf
>         
> I add two lines to make it read
> 
>         # Start daemon.
>         echo -n "Starting ppsldisc: "
>         /usr/local/bin/ppsldisc /dev/ttyS0 &
>         echo -n "Starting ntpd: "
>         daemon $NTPD -c $ntpconf
> 
> I have now modified Rodolfo's ppsldisc with the following minimal patch:
>
> [snip] 
>
> so that it kills itself after 60 seconds.
> Thats WAY longer than its going to take ntpd to get initialized, and
> once ntpd is running you no longer ned ppsldisc.
> 
> I think this would be a worthwhile change to ppsldisc.c, but that's
> up to Rodolfo,- I find it useful.

This is not needed since you can solve your problem with:

   /usr/local/bin/ppsldisc /dev/ttyS0 & pid=$? ; sleep 60 ; kill $pid

In this way the ppsldisc is more versatile due it's not solution
specific.

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti at enneenne.com
Linux Device Driver                          giometti at linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti



More information about the LinuxPPS mailing list