ntpclient: fix and cleanup

git-svn-id: svn://svn.openwrt.org/openwrt/packages@8222 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
olli 2007-07-30 08:34:04 +00:00
parent 31e66c112f
commit 863819e657
3 changed files with 9 additions and 11 deletions

View File

@ -10,12 +10,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ntpclient
PKG_VERSION:=2003_194
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://doolittle.icarus.com/ntpclient/
PKG_MD5SUM:=94e84d5c6023c5e1f3890b28d0a08c92
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
@ -30,15 +29,14 @@ define Package/ntpclient
URL:=http://doolittle.icarus.com/ntpclient/
endef
define Build/Compile
$(call Build/Compile/Default,all adjtimex)
endef
MAKE_FLAGS += \
all adjtimex
define Package/ntpclient/install
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./files/ntpclient.init $(1)/etc/hotplug.d/iface/20-ntpclient
$(INSTALL_DATA) ./files/ntpclient.hotplug $(1)/etc/hotplug.d/iface/20-ntpclient
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/ntpclient.config $(1)/etc/config/ntp_client
$(INSTALL_CONF) ./files/ntpclient.config $(1)/etc/config/ntpclient
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpclient $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/adjtimex $(1)/usr/sbin/

View File

@ -1,9 +1,9 @@
config ntp_client
config ntpclient
option hostname 'pool.ntp.org'
option port '123'
option count '1'
config ntp_client
config ntpclient
option hostname 'ntp.ubuntu.com'
option port '123'
option count '1'

View File

@ -10,7 +10,7 @@ config_cb() {
config_get cfgtype "$cfg" TYPE
case "$cfgtype" in
ntp_client)
ntpclient)
config_get hostname $cfg hostname
config_get port $cfg port
config_get count $cfg count
@ -26,7 +26,7 @@ config_cb() {
}
case "${ACTION:-ifup}" in
ifup)
config_load ntp_client&
config_load ntpclient&
;;
ifdown)
route -n 2>&- | grep '^0.0.0.0' >&- || killall ntpclient 2>&- >&-