ntpclient: moved to github
authorSteven Barth <cyrus@openwrt.org>
Thu, 14 Aug 2014 09:03:23 +0000 (09:03 +0000)
committerSteven Barth <cyrus@openwrt.org>
Thu, 14 Aug 2014 09:03:23 +0000 (09:03 +0000)
SVN-Revision: 42163

net/ntpclient/Makefile [deleted file]
net/ntpclient/files/ntpclient.config [deleted file]
net/ntpclient/files/ntpclient.hotplug [deleted file]
net/ntpclient/patches/100-daemon.patch [deleted file]

diff --git a/net/ntpclient/Makefile b/net/ntpclient/Makefile
deleted file mode 100644 (file)
index 841f3e0..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (C) 2006-2010 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=ntpclient
-PKG_VERSION:=2007_365
-PKG_RELEASE:=4
-
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://doolittle.icarus.com/ntpclient/
-PKG_MD5SUM:=cb98711f11769cdd22fc592844cef414
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-2007
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/ntpclient
-  SUBMENU:=Time Synchronization
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=NTP (Network Time Protocol) client
-  URL:=http://doolittle.icarus.com/ntpclient/
-  DEPENDS:=+librt
-endef
-
-define Package/ntpclient/description
-       NTP client for setting system time from NTP servers.
-endef
-
-define Package/ntpclient/conffiles
-/etc/config/ntpclient
-endef
-
-MAKE_FLAGS += \
-       all adjtimex
-
-define Package/ntpclient/install
-       $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
-       $(INSTALL_DATA) ./files/ntpclient.hotplug $(1)/etc/hotplug.d/iface/20-ntpclient
-       $(INSTALL_DIR) $(1)/etc/config
-       $(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/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/rate.awk $(1)/usr/sbin/
-endef
-
-$(eval $(call BuildPackage,ntpclient))
diff --git a/net/ntpclient/files/ntpclient.config b/net/ntpclient/files/ntpclient.config
deleted file mode 100644 (file)
index 10be886..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-config ntpserver
-       option hostname '0.openwrt.pool.ntp.org'
-       option port     '123'
-
-config ntpserver
-       option hostname '1.openwrt.pool.ntp.org'
-       option port     '123'
-
-config ntpserver
-       option hostname '2.openwrt.pool.ntp.org'
-       option port     '123'
-
-config ntpserver
-       option hostname '3.openwrt.pool.ntp.org'
-       option port     '123'
-
-config ntpdrift
-       option freq     '0'
-
-config ntpclient
-       option interval 600
-       #option count   10
-       #option interface wan
diff --git a/net/ntpclient/files/ntpclient.hotplug b/net/ntpclient/files/ntpclient.hotplug
deleted file mode 100644 (file)
index 536f531..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2006 OpenWrt.org
-
-. /lib/functions.sh
-
-unset SERVER
-unset PORT
-unset INTERVAL
-unset COUNT
-unset INTERFACE_GLOBAL
-
-NTPC=`which ntpclient`
-
-check_server() {
-       local hostname
-       local port
-       local interface
-       [ -n "$SERVER" ] && return
-       config_get hostname $1 hostname
-       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
-       $NTPC -c 1 -p ${port:-123} -i 2 -h $hostname > /dev/null && { SERVER=$hostname; PORT=${port:-123}; }
-}
-
-set_drift() {
-       config_get freq $1 freq
-       [ -n "$freq" ] && adjtimex -f $freq >/dev/null
-}
-
-start_ntpclient() {
-       config_foreach set_drift ntpdrift
-       config_foreach check_server ntpserver
-       [ -z "$SERVER" ] && exit 0
-       logger starting ntpclient
-       $NTPC ${COUNT:+-c $COUNT} ${INTERVAL:+-i $INTERVAL} -s -l -D -p $PORT -h $SERVER 2> /dev/null
-}
-
-stop_ntpclient() {
-       logger stopping ntpclient
-       killall ntpclient
-}
-
-load_settings() {
-       local interval
-       local count
-       local iface
-       
-       config_get interval $1 interval
-       config_get count $1 count
-       config_get interface $1 interface
-       
-       [ -n "$count" ] && COUNT=$count
-       [ -n "$interval" ] && INTERVAL=$interval
-       [ -n "$interface" ] && INTERFACE_GLOBAL=$interface
-}
-
-config_load ntpclient
-config_foreach load_settings ntpclient
-
-NTP_RUNNING=`ps  | grep $NTPC | grep -v grep`
-
-case "${ACTION:-ifup}" in
-       ifup)
-               [ -z "$NTP_RUNNING" ] && start_ntpclient 
-       ;;
-       ifdown)
-               [ -n "$NTP_RUNNING" ] && stop_ntpclient 
-       ;;
-esac
diff --git a/net/ntpclient/patches/100-daemon.patch b/net/ntpclient/patches/100-daemon.patch
deleted file mode 100644 (file)
index 0ff8d5e..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: ntpclient-2007/ntpclient.c
-===================================================================
---- ntpclient-2007.orig/ntpclient.c    2008-08-12 03:11:34.000000000 +0200
-+++ ntpclient-2007/ntpclient.c 2008-08-12 03:11:36.000000000 +0200
-@@ -614,7 +614,7 @@
-       ntpc.cross_check=1;
-       for (;;) {
--              c = getopt( argc, argv, "c:" DEBUG_OPTION "f:g:h:i:lp:q:" REPLAY_OPTION "st");
-+              c = getopt( argc, argv, "c:" DEBUG_OPTION "f:g:h:i:lp:q:" REPLAY_OPTION "stD");
-               if (c == EOF) break;
-               switch (c) {
-                       case 'c':
-@@ -663,6 +663,10 @@
-                               (ntpc.cross_check)=0;
-                               break;
-+                      case 'D':
-+                              daemon();
-+                              break;
-+
-                       default:
-                               usage(argv[0]);
-                               exit(1);