Modify

Opened 6 years ago

Last modified 4 years ago

#10264 new defect

chrony hangs if network is not available

Reported by: yan@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: ntp chrony Cc:

Description

I am using gpsd as a time source. chrony hangs if the network is not available.

This patch to /etc/init.d/ntpd adds a possible value of "gpsd" to TimeServers in /etc/config/ntpd .

*** bin/ar71xx/rootfs/etc/init.d/ntpd	2011-09-29 21:43:01.000000000 -0700
--- ntpd	2011-10-22 17:38:18.000000000 -0700
***************
*** 19,20 ****
--- 19,26 ----
  		scan_interfaces
+ 		if [ $NTP_SERVERS = "gpsd" ] ; then
+ 		(	echo password $CHRONY_KEY
+ 			echo burst 5/5
+ 		) | chronyc > /dev/null 2>&1
+ 		
+ 		else
  
***************
*** 31,32 ****
--- 37,39 ----
  		while chronyc tracking | grep 'Reference ID.*0.0.0.0' >/dev/null ; do sleep 1; done
+ 		fi
  		# ... and finally, adjust the time in a single step

/etc/config/ntpd:

config ntpd
	option ClientAccessFrom	"lan"
	option TimeServers "gpsd"

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by anonymous

To use gpsd as a time source, the following should be added to /etc/chrony/chrony.conf

I don't think it will cause problems if it's permanently included; chrony will ignore the missing refclock. There is no way that I've found to add a refclock using chronyc

# delay 0.0 is right, but use 0.2 to avoid NMEA
# time fighting with PPS time
refclock SHM 0 offset 0.0 delay 0.2
refclock SHM 1 offset 0.0 delay 0.0

refclock SOCK /dev/gps

comment:2 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.