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

clemens at dwf.com clemens at dwf.com
Tue Aug 26 22:41:56 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.
> 
Clever solution!
Tho I still don't see the necessity for a ppsldisc that stays around forever.

-- 
                                        Reg.Clemens
                                        reg at dwf.com





More information about the LinuxPPS mailing list