openwrt: bump ntpclient package version to 2007_365_4

This commit is contained in:
Bart Van Der Meerssche 2010-09-20 20:39:44 +02:00
parent 61e4a58b1d
commit a2e6ef8d9f
3 changed files with 18 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# #
# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006-2010 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ntpclient PKG_NAME:=ntpclient
PKG_VERSION:=2007_365 PKG_VERSION:=2007_365
PKG_RELEASE:=1 PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://doolittle.icarus.com/ntpclient/ PKG_SOURCE_URL:=http://doolittle.icarus.com/ntpclient/

View File

@ -20,3 +20,4 @@ config ntpdrift
config ntpclient config ntpclient
option interval 600 option interval 600
#option count 10 #option count 10
#option interface wan

View File

@ -7,16 +7,28 @@ unset SERVER
unset PORT unset PORT
unset INTERVAL unset INTERVAL
unset COUNT unset COUNT
unset INTERFACE_GLOBAL
NTPC=`which ntpclient` NTPC=`which ntpclient`
check_server() { check_server() {
local hostname local hostname
local port local port
local interface
[ -n "$SERVER" ] && return [ -n "$SERVER" ] && return
config_get hostname $1 hostname config_get hostname $1 hostname
config_get port $1 port config_get port $1 port
config_get interface $1 interface
[ -z "$interface" ] && interface=$INTERFACE_GLOBAL
[ -n "$interface" ] && {
# $INTERFACE is passed from hotplug event
[ "$interface" = "$INTERFACE" ] || return
}
[ -z "$hostname" ] && return [ -z "$hostname" ] && return
$NTPC -c 1 -p ${port:-123} -h $hostname > /dev/null && { SERVER=$hostname; PORT=${port:-123}; } $NTPC -c 1 -p ${port:-123} -i 2 -h $hostname > /dev/null && { SERVER=$hostname; PORT=${port:-123}; }
} }
set_drift() { set_drift() {
@ -44,9 +56,11 @@ load_settings() {
config_get interval $1 interval config_get interval $1 interval
config_get count $1 count config_get count $1 count
config_get interface $1 interface
[ -n "$count" ] && COUNT=$count [ -n "$count" ] && COUNT=$count
[ -n "$interval" ] && INTERVAL=$interval [ -n "$interval" ] && INTERVAL=$interval
[ -n "$interface" ] && INTERFACE_GLOBAL=$interface
} }
config_load ntpclient config_load ntpclient