View | Details | Raw Unified | Return to bug 209577
Collapse All | Expand All

(-)/etc/rc.d/ntpd (-2 / +2 lines)
Lines 99-114 Link Here
99
		$verbose not replacing $ntp_db_leapfile with $ntp_src_leapfile 
99
		$verbose not replacing $ntp_db_leapfile with $ntp_src_leapfile 
100
	fi
100
	fi
101
	ntp_leap_expiry=$(get_ntp_leapfile_expiry $ntp_db_leapfile)
101
	ntp_leap_expiry=$(get_ntp_leapfile_expiry $ntp_db_leapfile)
102
	ntp_leapfile_expiry_seconds=$((ntp_leapfile_expiry_days*86400))
102
	ntp_leapfile_expiry_seconds=$((ntp_leapfile_expiry_days*86400))
103
	ntp_leap_fetch_date=$((ntp_leap_expiry-ntp_leapfile_expiry_seconds))
103
	ntp_leap_fetch_date=$((ntp_leap_expiry-ntp_leapfile_expiry_seconds))
104
	if [ $(current_ntp_ts) -ge $ntp_leap_fetch_date ]; then
104
	if [ $(current_ntp_ts) -ge $ntp_leap_fetch_date ]; then
105
		$verbose Within ntp leapfile expiry limit, initiating fetch
105
		$verbose Within ntp leapfile expiry limit, initiating fetch
106
		for url in $ntp_leapfile_sources ; do
106
		for url in $ntp_leapfile_sources ; do
107
			$verbose fetching $url
107
			$verbose fetching $url
108
			fetch $ntp_leapfile_fetch_opts -o $ntp_tmp_leapfile $url && break
108
			fetch $ntp_leapfile_fetch_opts -o $ntp_tmp_leapfile $url && break
109
		done
109
		done
110
		ntp_ver_no_tmp=$(get_ntp_leapfile_ver $ntp_tmp_leapfile)
110
		ntp_expiry_tmp=$(get_ntp_leapfile_expiry $ntp_tmp_leapfile)
111
		if [ "$ntp_ver_no_tmp" -gt "$ntp_ver_no_db" ]; then
111
		if [ "$ntp_expiry_tmp" -gt "$ntp_leap_expiry" ]; then
112
			$verbose using $url as $ntp_db_leapfile
112
			$verbose using $url as $ntp_db_leapfile
113
			mv $ntp_tmp_leapfile $ntp_db_leapfile
113
			mv $ntp_tmp_leapfile $ntp_db_leapfile
114
		else
114
		else

Return to bug 209577