summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2014-12-20 22:52:39 +0000
committerCy Schubert <cy@FreeBSD.org>2014-12-20 22:52:39 +0000
commitb5e14a1344528861a7016aa2c6b0f2e9630d1526 (patch)
treef04bed14f7e8aed5c0e9d2f7785175c7951036d3 /scripts
parent2b45e011ca352ce509bc83ae148230aeee0c7e0d (diff)
downloadsrc-test2-vendor/ntp/4.2.8.tar.gz
src-test2-vendor/ntp/4.2.8.zip
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am193
-rw-r--r--scripts/Makefile.in827
-rw-r--r--scripts/README26
-rw-r--r--scripts/build/Makefile.am17
-rw-r--r--scripts/build/Makefile.in551
-rwxr-xr-xscripts/build/UpdatePoint (renamed from scripts/UpdatePoint)6
-rwxr-xr-xscripts/build/VersionName (renamed from scripts/VersionName)8
-rwxr-xr-xscripts/build/check--help (renamed from scripts/check--help)0
-rwxr-xr-xscripts/build/checkChangeLog (renamed from scripts/checkChangeLog)0
-rwxr-xr-xscripts/build/checkHtmlFileDates16
-rwxr-xr-x[-rw-r--r--]scripts/build/fixautomakedepsmagic (renamed from scripts/fixautomakedepsmagic)0
-rwxr-xr-xscripts/build/genCommitLog (renamed from scripts/genCommitLog)0
-rwxr-xr-xscripts/build/genver96
-rw-r--r--scripts/build/mkver.in (renamed from scripts/mkver.in)8
-rwxr-xr-xscripts/build/updateBEDate53
-rw-r--r--scripts/calc_tickadj.in38
-rw-r--r--scripts/calc_tickadj/Makefile.am104
-rw-r--r--scripts/calc_tickadj/Makefile.in866
-rw-r--r--scripts/calc_tickadj/calc_tickadj-opts60
-rw-r--r--scripts/calc_tickadj/calc_tickadj-opts.def60
-rw-r--r--scripts/calc_tickadj/calc_tickadj.1calc_tickadjman108
-rw-r--r--scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc84
-rw-r--r--scripts/calc_tickadj/calc_tickadj.html166
-rw-r--r--scripts/calc_tickadj/calc_tickadj.in59
-rw-r--r--scripts/calc_tickadj/calc_tickadj.man.in108
-rw-r--r--scripts/calc_tickadj/calc_tickadj.mdoc.in84
-rw-r--r--scripts/calc_tickadj/calc_tickadj.texi37
-rw-r--r--scripts/calc_tickadj/invoke-calc_tickadj.menu1
-rw-r--r--scripts/calc_tickadj/invoke-calc_tickadj.texi102
-rw-r--r--scripts/checktime.in79
-rwxr-xr-xscripts/cvo.sh150
-rw-r--r--scripts/deprecated/freq_adj.in (renamed from scripts/freq_adj.in)0
-rwxr-xr-xscripts/deprecated/hpadjtime.sh (renamed from scripts/hpadjtime.sh)0
-rwxr-xr-xscripts/deprecated/html2man.in (renamed from scripts/html2man.in)24
-rwxr-xr-xscripts/deprecated/ntp-close (renamed from scripts/ntp-close)0
-rwxr-xr-xscripts/deprecated/ntp-groper (renamed from scripts/ntp-groper)0
-rwxr-xr-xscripts/deprecated/ntp-restart (renamed from scripts/ntp-restart)0
-rwxr-xr-xscripts/deprecated/ntp-status (renamed from scripts/ntp-status)0
-rwxr-xr-xscripts/genver88
-rw-r--r--scripts/invoke-plot_summary.menu1
-rw-r--r--scripts/invoke-plot_summary.texi121
-rw-r--r--scripts/invoke-summary.menu1
-rw-r--r--scripts/invoke-summary.texi103
-rw-r--r--scripts/lib/Makefile.am5
-rw-r--r--scripts/lib/Makefile.in584
-rw-r--r--scripts/lib/NTP/Util.pm137
-rw-r--r--scripts/monitoring/ntp.pl81
-rw-r--r--scripts/monitoring/ntptrap10
-rw-r--r--scripts/ntp-wait.in54
-rw-r--r--scripts/ntp-wait/Makefile.am96
-rw-r--r--scripts/ntp-wait/Makefile.in880
-rw-r--r--scripts/ntp-wait/invoke-ntp-wait.menu1
-rw-r--r--scripts/ntp-wait/invoke-ntp-wait.texi114
-rw-r--r--scripts/ntp-wait/ntp-wait-opts62
-rw-r--r--scripts/ntp-wait/ntp-wait-opts.def109
-rw-r--r--scripts/ntp-wait/ntp-wait.1ntp-waitman122
-rw-r--r--scripts/ntp-wait/ntp-wait.1ntp-waitmdoc95
-rw-r--r--scripts/ntp-wait/ntp-wait.html208
-rw-r--r--scripts/ntp-wait/ntp-wait.in66
-rw-r--r--scripts/ntp-wait/ntp-wait.man.in122
-rw-r--r--scripts/ntp-wait/ntp-wait.mdoc.in95
-rw-r--r--scripts/ntp-wait/ntp-wait.texi52
-rw-r--r--scripts/ntpsweep.in300
-rw-r--r--scripts/ntpsweep/Makefile.am102
-rw-r--r--scripts/ntpsweep/Makefile.in886
-rw-r--r--scripts/ntpsweep/invoke-ntpsweep.menu1
-rw-r--r--scripts/ntpsweep/invoke-ntpsweep.texi118
-rw-r--r--scripts/ntpsweep/ntpsweep-opts67
-rw-r--r--scripts/ntpsweep/ntpsweep-opts.def66
-rw-r--r--scripts/ntpsweep/ntpsweep.1ntpsweepman97
-rw-r--r--scripts/ntpsweep/ntpsweep.1ntpsweepmdoc75
-rw-r--r--scripts/ntpsweep/ntpsweep.html201
-rw-r--r--scripts/ntpsweep/ntpsweep.in204
-rw-r--r--scripts/ntpsweep/ntpsweep.man.in97
-rw-r--r--scripts/ntpsweep/ntpsweep.mdoc.in75
-rw-r--r--scripts/ntpsweep/ntpsweep.texi43
-rwxr-xr-xscripts/ntptrace.in71
-rw-r--r--scripts/ntptrace/Makefile.am95
-rw-r--r--scripts/ntptrace/Makefile.in879
-rw-r--r--scripts/ntptrace/invoke-ntptrace.menu1
-rw-r--r--scripts/ntptrace/invoke-ntptrace.texi109
-rw-r--r--scripts/ntptrace/ntptrace-opts62
-rw-r--r--scripts/ntptrace/ntptrace-opts.def69
-rw-r--r--scripts/ntptrace/ntptrace.1ntptraceman114
-rw-r--r--scripts/ntptrace/ntptrace.1ntptracemdoc91
-rw-r--r--scripts/ntptrace/ntptrace.html180
-rwxr-xr-xscripts/ntptrace/ntptrace.in80
-rw-r--r--scripts/ntptrace/ntptrace.man.in114
-rw-r--r--scripts/ntptrace/ntptrace.mdoc.in91
-rw-r--r--scripts/ntptrace/ntptrace.texi40
-rw-r--r--scripts/ntpver.in4
-rw-r--r--scripts/plot_summary-opts73
-rw-r--r--scripts/plot_summary-opts.def83
-rw-r--r--scripts/plot_summary.1plot_summaryman114
-rw-r--r--scripts/plot_summary.1plot_summarymdoc88
-rw-r--r--scripts/plot_summary.html207
-rw-r--r--scripts/plot_summary.in90
-rw-r--r--scripts/plot_summary.man.in114
-rw-r--r--scripts/plot_summary.mdoc.in88
-rw-r--r--scripts/plot_summary.texi40
-rw-r--r--scripts/rc/README13
-rw-r--r--scripts/rc/ntpd88
-rw-r--r--scripts/rc/ntpwait15
-rw-r--r--scripts/rc/rc.d/TIMESYNC8
-rw-r--r--scripts/rc/rc.d/ntpd32
-rw-r--r--scripts/rc/rc.d/ntpwait21
-rw-r--r--scripts/rc1/postinstall2
-rw-r--r--scripts/rc1/preinstall6
-rw-r--r--scripts/rc1/preremove4
-rw-r--r--scripts/rc1/prototype19
-rw-r--r--scripts/rc1/xntp29
-rw-r--r--scripts/rc2/local.ntpd64
-rw-r--r--scripts/summary-opts69
-rw-r--r--scripts/summary-opts.def82
-rw-r--r--scripts/summary.1summaryman123
-rw-r--r--scripts/summary.1summarymdoc98
-rw-r--r--scripts/summary.html182
-rw-r--r--scripts/summary.in162
-rw-r--r--scripts/summary.man.in123
-rw-r--r--scripts/summary.mdoc.in98
-rw-r--r--scripts/summary.texi40
121 files changed, 12326 insertions, 1319 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 017ea0219127..7ddf4247bf47 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1,39 +1,174 @@
NULL=
+SUBDIRS= \
+ build \
+ calc_tickadj \
+ ntp-wait \
+ ntpsweep \
+ ntptrace \
+ lib \
+ $(NULL)
+
+man1_MANS=
+man8_MANS=
+
+DISTCLEANFILES= config.log $(man_MANS)
-if NTP_BINSUBDIR_IS_BIN
-bin_SCRIPTS = ntp-wait ntptrace
-else
-sbin_SCRIPTS = ntp-wait ntptrace
-endif
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
noinst_SCRIPTS = \
- calc_tickadj \
- checktime \
- freq_adj \
- html2man \
- mkver \
- ntpsweep \
ntpver \
plot_summary \
summary \
$(NULL)
-EXTRA_DIST = \
- check--help \
- checkChangeLog \
- cvo.sh \
- fixautomakedepsmagic \
- genCommitLog \
- genver \
- hpadjtime.sh \
- monitoring \
- ntp-close \
- ntp-groper \
- ntp-restart \
- ntp-status \
- rc1 \
- rc2 \
- stats \
- UpdatePoint \
- VersionName \
+install-data-local: install-html
+
+EXTRA_DIST = \
+ deprecated \
+ monitoring \
+ invoke-plot_summary.texi \
+ invoke-plot_summary.menu \
+ plot_summary.1plot_summaryman \
+ plot_summary.1plot_summarymdoc \
+ plot_summary.mdoc.in \
+ plot_summary.man.in \
+ plot_summary.texi \
+ plot_summary.html \
+ plot_summary-opts \
+ plot_summary-opts.def \
+ rc \
+ invoke-summary.texi \
+ invoke-summary.menu \
+ summary.1summaryman \
+ summary.1summarymdoc \
+ summary.mdoc.in \
+ summary.man.in \
+ summary.texi \
+ summary.html \
+ summary-opts \
+ summary-opts.def \
+ stats \
$(NULL)
+
+noinst_DATA = \
+ invoke-plot_summary.texi \
+ invoke-plot_summary.menu \
+ plot_summary.1plot_summaryman \
+ plot_summary.1plot_summarymdoc \
+ plot_summary.mdoc.in \
+ plot_summary.man.in \
+ plot_summary.texi \
+ plot_summary.html \
+ invoke-summary.texi \
+ invoke-summary.menu \
+ summary.1summaryman \
+ summary.1summarymdoc \
+ summary.mdoc.in \
+ summary.man.in \
+ summary.texi \
+ summary.html \
+ $(NULL)
+
+#OPTTPL = ../sntp/ag-tpl/perlopt.tpl
+OPTTPL = $(std_def_list)
+
+##
+
+plot_summary: $(srcdir)/plot_summary-opts
+
+$(srcdir)/plot_summary-opts: plot_summary-opts.def $(OPTTPL)
+ $(run_ag) plot_summary-opts.def
+
+### Nroff
+
+$(srcdir)/plot_summary.1plot_summaryman: $(srcdir)/plot_summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1plot_summaryman -Tagman-cmd.tpl plot_summary-opts.def
+
+$(srcdir)/plot_summary.man.in: $(srcdir)/plot_summary.1plot_summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summaryman > $(srcdir)/plot_summary.man.in+
+ mv $(srcdir)/plot_summary.man.in+ $(srcdir)/plot_summary.man.in
+
+### Mdoc
+
+$(srcdir)/plot_summary.1plot_summarymdoc: $(srcdir)/plot_summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1plot_summarymdoc -Tagmdoc-cmd.tpl plot_summary-opts.def
+
+$(srcdir)/plot_summary.mdoc.in: $(srcdir)/plot_summary.1plot_summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summarymdoc > $(srcdir)/plot_summary.mdoc.in+
+ mv $(srcdir)/plot_summary.mdoc.in+ $(srcdir)/plot_summary.mdoc.in
+
+### Manpage (local)
+
+plot_summary.1: $(srcdir)/plot_summary.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=plot_summary.1+:$(srcdir)/plot_summary.$(MANTAGFMT).in
+ mv plot_summary.1+ plot_summary.1
+
+### Texinfo
+
+$(srcdir)/invoke-plot_summary.menu: $(srcdir)/invoke-plot_summary.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-plot_summary.texi: plot_summary-opts $(srcdir)/plot_summary-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section plot_summary-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/plot_summary.html: $(srcdir)/invoke-plot_summary.menu $(srcdir)/invoke-plot_summary.texi $(srcdir)/plot_summary.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o plot_summary.html plot_summary.texi || true )
+
+
+##
+
+summary: $(srcdir)/summary-opts
+
+$(srcdir)/summary-opts: summary-opts.def $(OPTTPL)
+ $(run_ag) summary-opts.def
+
+### Nroff
+
+$(srcdir)/summary.1summaryman: $(srcdir)/summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1summaryman -Tagman-cmd.tpl summary-opts.def
+
+$(srcdir)/summary.man.in: $(srcdir)/summary.1summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summaryman > $(srcdir)/summary.man.in+
+ mv $(srcdir)/summary.man.in+ $(srcdir)/summary.man.in
+
+### Mdoc
+
+$(srcdir)/summary.1summarymdoc: $(srcdir)/summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1summarymdoc -Tagmdoc-cmd.tpl summary-opts.def
+
+$(srcdir)/summary.mdoc.in: $(srcdir)/summary.1summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summarymdoc > $(srcdir)/summary.mdoc.in+
+ mv $(srcdir)/summary.mdoc.in+ $(srcdir)/summary.mdoc.in
+
+### Manpage (local)
+
+summary.1: $(srcdir)/summary.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=summary.1+:$(srcdir)/summary.$(MANTAGFMT).in
+ mv summary.1+ summary.1
+
+### Texinfo
+
+$(srcdir)/invoke-summary.menu: $(srcdir)/invoke-summary.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-summary.texi: summary-opts $(srcdir)/summary-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section summary-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/summary.html: $(srcdir)/invoke-summary.menu $(srcdir)/invoke-summary.texi $(srcdir)/summary.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o summary.html summary.texi || true )
+
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index e41f06cc9786..593f438570a2 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -15,6 +15,7 @@
@SET_MAKE@
+
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -36,30 +37,66 @@ build_triplet = @build@
host_triplet = @host@
subdir = scripts
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/calc_tickadj.in $(srcdir)/checktime.in \
- $(srcdir)/freq_adj.in $(srcdir)/html2man.in $(srcdir)/mkver.in \
- $(srcdir)/ntp-wait.in $(srcdir)/ntpsweep.in \
- $(srcdir)/ntptrace.in $(srcdir)/ntpver.in \
- $(srcdir)/plot_summary.in $(srcdir)/summary.in
+ $(srcdir)/ntpver.in $(srcdir)/plot_summary.in \
+ $(srcdir)/summary.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = calc_tickadj checktime freq_adj html2man mkver \
- ntp-wait ntpsweep ntptrace ntpver plot_summary summary
+CONFIG_CLEAN_FILES = ntpver plot_summary summary
CONFIG_CLEAN_VPATH_FILES =
+SCRIPTS = $(noinst_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -81,26 +118,73 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"
-SCRIPTS = $(bin_SCRIPTS) $(noinst_SCRIPTS) $(sbin_SCRIPTS)
-SOURCES =
-DIST_SOURCES =
+man1dir = $(mandir)/man1
+am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man1_MANS) $(man8_MANS)
+DATA = $(noinst_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -112,21 +196,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -134,6 +228,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -152,14 +247,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -172,10 +321,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -183,9 +334,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -194,6 +363,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -242,41 +412,86 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-@NTP_BINSUBDIR_IS_BIN_TRUE@bin_SCRIPTS = ntp-wait ntptrace
-@NTP_BINSUBDIR_IS_BIN_FALSE@sbin_SCRIPTS = ntp-wait ntptrace
+SUBDIRS = \
+ build \
+ calc_tickadj \
+ ntp-wait \
+ ntpsweep \
+ ntptrace \
+ lib \
+ $(NULL)
+
+man1_MANS =
+man8_MANS =
+DISTCLEANFILES = config.log $(man_MANS)
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
noinst_SCRIPTS = \
- calc_tickadj \
- checktime \
- freq_adj \
- html2man \
- mkver \
- ntpsweep \
ntpver \
plot_summary \
summary \
$(NULL)
EXTRA_DIST = \
- check--help \
- checkChangeLog \
- cvo.sh \
- fixautomakedepsmagic \
- genCommitLog \
- genver \
- hpadjtime.sh \
- monitoring \
- ntp-close \
- ntp-groper \
- ntp-restart \
- ntp-status \
- rc1 \
- rc2 \
- stats \
- UpdatePoint \
- VersionName \
+ deprecated \
+ monitoring \
+ invoke-plot_summary.texi \
+ invoke-plot_summary.menu \
+ plot_summary.1plot_summaryman \
+ plot_summary.1plot_summarymdoc \
+ plot_summary.mdoc.in \
+ plot_summary.man.in \
+ plot_summary.texi \
+ plot_summary.html \
+ plot_summary-opts \
+ plot_summary-opts.def \
+ rc \
+ invoke-summary.texi \
+ invoke-summary.menu \
+ summary.1summaryman \
+ summary.1summarymdoc \
+ summary.mdoc.in \
+ summary.man.in \
+ summary.texi \
+ summary.html \
+ summary-opts \
+ summary-opts.def \
+ stats \
+ $(NULL)
+
+noinst_DATA = \
+ invoke-plot_summary.texi \
+ invoke-plot_summary.menu \
+ plot_summary.1plot_summaryman \
+ plot_summary.1plot_summarymdoc \
+ plot_summary.mdoc.in \
+ plot_summary.man.in \
+ plot_summary.texi \
+ plot_summary.html \
+ invoke-summary.texi \
+ invoke-summary.menu \
+ summary.1summaryman \
+ summary.1summarymdoc \
+ summary.mdoc.in \
+ summary.man.in \
+ summary.texi \
+ summary.html \
$(NULL)
-all: all-am
+
+#OPTTPL = ../sntp/ag-tpl/perlopt.tpl
+OPTTPL = $(std_def_list)
+all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@@ -309,110 +524,236 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
-calc_tickadj: $(top_builddir)/config.status $(srcdir)/calc_tickadj.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-checktime: $(top_builddir)/config.status $(srcdir)/checktime.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-freq_adj: $(top_builddir)/config.status $(srcdir)/freq_adj.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-html2man: $(top_builddir)/config.status $(srcdir)/html2man.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-mkver: $(top_builddir)/config.status $(srcdir)/mkver.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-ntp-wait: $(top_builddir)/config.status $(srcdir)/ntp-wait.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-ntpsweep: $(top_builddir)/config.status $(srcdir)/ntpsweep.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-ntptrace: $(top_builddir)/config.status $(srcdir)/ntptrace.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
ntpver: $(top_builddir)/config.status $(srcdir)/ntpver.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
plot_summary: $(top_builddir)/config.status $(srcdir)/plot_summary.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
summary: $(top_builddir)/config.status $(srcdir)/summary.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-install-binSCRIPTS: $(bin_SCRIPTS)
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man1_MANS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
- @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
done | \
- sed -e 'p;s,.*/,,;n' \
- -e 'h;s|.*|.|' \
- -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) { files[d] = files[d] " " $$1; \
- if (++n[d] == $(am__install_max)) { \
- print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
- else { print "f", d "/" $$4, $$1 } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
- $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-binSCRIPTS:
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
@$(NORMAL_UNINSTALL)
- @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
-install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
- @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
done | \
- sed -e 'p;s,.*/,,;n' \
- -e 'h;s|.*|.|' \
- -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) { files[d] = files[d] " " $$1; \
- if (++n[d] == $(am__install_max)) { \
- print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
- else { print "f", d "/" $$4, $$1 } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
- $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-sbinSCRIPTS:
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
@$(NORMAL_UNINSTALL)
- @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
-mostlyclean-libtool:
- -rm -f *.lo
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
-clean-libtool:
- -rm -rf .libs _libs
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
tags: TAGS
-TAGS:
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
ctags: CTAGS
-CTAGS:
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -442,22 +783,51 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
check-am: all-am
-check: check-am
-all-am: Makefile $(SCRIPTS)
-installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"; do \
+check: check-recursive
+all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-installcheck: installcheck-am
+installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
@@ -470,91 +840,186 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
+clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
-distclean: distclean-am
+distclean: distclean-recursive
-rm -f Makefile
-distclean-am: clean-am distclean-generic
+distclean-am: clean-am distclean-generic distclean-tags
-dvi: dvi-am
+dvi: dvi-recursive
dvi-am:
-html: html-am
+html: html-recursive
html-am:
-info: info-am
+info: info-recursive
info-am:
-install-data-am:
+install-data-am: install-data-local install-man
-install-dvi: install-dvi-am
+install-dvi: install-dvi-recursive
install-dvi-am:
-install-exec-am: install-binSCRIPTS install-sbinSCRIPTS
+install-exec-am:
-install-html: install-html-am
+install-html: install-html-recursive
install-html-am:
-install-info: install-info-am
+install-info: install-info-recursive
install-info-am:
-install-man:
+install-man: install-man1 install-man8
-install-pdf: install-pdf-am
+install-pdf: install-pdf-recursive
install-pdf-am:
-install-ps: install-ps-am
+install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
-maintainer-clean: maintainer-clean-am
+maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
-mostlyclean: mostlyclean-am
+mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-pdf: pdf-am
+pdf: pdf-recursive
pdf-am:
-ps: ps-am
+ps: ps-recursive
ps-am:
-uninstall-am: uninstall-binSCRIPTS uninstall-sbinSCRIPTS
+uninstall-am: uninstall-man
+
+uninstall-man: uninstall-man1 uninstall-man8
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-man1 \
+ install-man8 install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-man uninstall-man1 \
+ uninstall-man8
+
+
+install-data-local: install-html
+
+plot_summary: $(srcdir)/plot_summary-opts
+
+$(srcdir)/plot_summary-opts: plot_summary-opts.def $(OPTTPL)
+ $(run_ag) plot_summary-opts.def
+
+### Nroff
+
+$(srcdir)/plot_summary.1plot_summaryman: $(srcdir)/plot_summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1plot_summaryman -Tagman-cmd.tpl plot_summary-opts.def
+
+$(srcdir)/plot_summary.man.in: $(srcdir)/plot_summary.1plot_summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summaryman > $(srcdir)/plot_summary.man.in+
+ mv $(srcdir)/plot_summary.man.in+ $(srcdir)/plot_summary.man.in
+
+### Mdoc
+
+$(srcdir)/plot_summary.1plot_summarymdoc: $(srcdir)/plot_summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1plot_summarymdoc -Tagmdoc-cmd.tpl plot_summary-opts.def
+
+$(srcdir)/plot_summary.mdoc.in: $(srcdir)/plot_summary.1plot_summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summarymdoc > $(srcdir)/plot_summary.mdoc.in+
+ mv $(srcdir)/plot_summary.mdoc.in+ $(srcdir)/plot_summary.mdoc.in
+
+### Manpage (local)
+
+plot_summary.1: $(srcdir)/plot_summary.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=plot_summary.1+:$(srcdir)/plot_summary.$(MANTAGFMT).in
+ mv plot_summary.1+ plot_summary.1
+
+### Texinfo
+
+$(srcdir)/invoke-plot_summary.menu: $(srcdir)/invoke-plot_summary.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-plot_summary.texi: plot_summary-opts $(srcdir)/plot_summary-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section plot_summary-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/plot_summary.html: $(srcdir)/invoke-plot_summary.menu $(srcdir)/invoke-plot_summary.texi $(srcdir)/plot_summary.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o plot_summary.html plot_summary.texi || true )
+
+summary: $(srcdir)/summary-opts
+
+$(srcdir)/summary-opts: summary-opts.def $(OPTTPL)
+ $(run_ag) summary-opts.def
+
+### Nroff
+
+$(srcdir)/summary.1summaryman: $(srcdir)/summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1summaryman -Tagman-cmd.tpl summary-opts.def
+
+$(srcdir)/summary.man.in: $(srcdir)/summary.1summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summaryman > $(srcdir)/summary.man.in+
+ mv $(srcdir)/summary.man.in+ $(srcdir)/summary.man.in
+
+### Mdoc
+
+$(srcdir)/summary.1summarymdoc: $(srcdir)/summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1summarymdoc -Tagmdoc-cmd.tpl summary-opts.def
+
+$(srcdir)/summary.mdoc.in: $(srcdir)/summary.1summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summarymdoc > $(srcdir)/summary.mdoc.in+
+ mv $(srcdir)/summary.mdoc.in+ $(srcdir)/summary.mdoc.in
+
+### Manpage (local)
+
+summary.1: $(srcdir)/summary.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=summary.1+:$(srcdir)/summary.$(MANTAGFMT).in
+ mv summary.1+ summary.1
+
+### Texinfo
+
+$(srcdir)/invoke-summary.menu: $(srcdir)/invoke-summary.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
-.MAKE: install-am install-strip
+$(srcdir)/invoke-summary.texi: summary-opts $(srcdir)/summary-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section summary-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-binSCRIPTS install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-sbinSCRIPTS install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
- ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
- uninstall-sbinSCRIPTS
+### HTML
+$(srcdir)/summary.html: $(srcdir)/invoke-summary.menu $(srcdir)/invoke-summary.texi $(srcdir)/summary.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o summary.html summary.texi || true )
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/scripts/README b/scripts/README
index 673ddb4492e2..9f70a6362888 100644
--- a/scripts/README
+++ b/scripts/README
@@ -6,38 +6,26 @@ files in the parent directory for directions on how to use these files.
calc_tickadj Calculates "optimal" value for tick given ntp.drift file
-freq_adj Calculates and optionally sets the clock frequency
- based on ntp.drift . For FreeBSD systems.
-
-mkver.in script to create new version numbers for all sources
-
monitoring directory containing perl scripts useful for monitoring
operations
-rc1 start/stop scripts for NTP
-
-rc2 start/stop script for NTP
-
-ntp-close find public stratum 2 servers that don't respond
-
-ntp-groper script useful for reaching out and rattling the cages of
- NTP peers to see if animals are inside the bars
-
-ntp-restart script useful for killing and restarting the NTP daemon
+rc start/stop scripts for NTP
ntp-wait Blocks until ntpd is in state 4 (synchronized).
- Hopefully useful at boot time, to delay the boot sequence
+ Useful at boot time, to delay the boot sequence
until after "ntpd -g" has set the time.
ntpsweep prints per host given in <file> the NTP stratum level, the
clock offset in seconds, the daemon version, the operating
system and the processor.
-ntpver What version of the NTP daemon is running?
+ntptrace Trace ntp peers of a server up to stratum 1.
stats directory containing awk and shell scripts useful for
maintaining statistics summaries of clockstats, loopstats
and peerstats files
-support directory containing shell and perl scripts useful for
- configuration and monitoring of NTP subnets
+summary Generate summary files out of stat files produced by NTP
+ daemon.
+
+plot_summary Plot summaries generated by summary script.
diff --git a/scripts/build/Makefile.am b/scripts/build/Makefile.am
new file mode 100644
index 000000000000..51a1bbccfb64
--- /dev/null
+++ b/scripts/build/Makefile.am
@@ -0,0 +1,17 @@
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl
+
+noinst_SCRIPTS = mkver
+
+NULL=
+EXTRA_DIST = \
+ check--help \
+ checkChangeLog \
+ checkHtmlFileDates \
+ fixautomakedepsmagic \
+ genCommitLog \
+ genver \
+ updateBEDate \
+ UpdatePoint \
+ VersionName \
+ $(NULL)
diff --git a/scripts/build/Makefile.in b/scripts/build/Makefile.in
new file mode 100644
index 000000000000..e1d881161450
--- /dev/null
+++ b/scripts/build/Makefile.in
@@ -0,0 +1,551 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = scripts/build
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/mkver.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = mkver
+CONFIG_CLEAN_VPATH_FILES =
+SCRIPTS = $(noinst_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
+MAKE_LIBPARSE = @MAKE_LIBPARSE@
+MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
+MAKE_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl
+
+noinst_SCRIPTS = mkver
+NULL =
+EXTRA_DIST = \
+ check--help \
+ checkChangeLog \
+ checkHtmlFileDates \
+ fixautomakedepsmagic \
+ genCommitLog \
+ genver \
+ updateBEDate \
+ UpdatePoint \
+ VersionName \
+ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/build/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/build/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+mkver: $(top_builddir)/config.status $(srcdir)/mkver.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/scripts/UpdatePoint b/scripts/build/UpdatePoint
index 309cdccb657e..e3c5957dc6bc 100755
--- a/scripts/UpdatePoint
+++ b/scripts/build/UpdatePoint
@@ -306,7 +306,7 @@ case "$newrcpoint" in
esac
printf "Previous version: "
-scripts/VersionName
+scripts/build/VersionName
# apply packageinfo.sh changes
@@ -321,11 +321,11 @@ case "$test" in
0)
mv packageinfo.sh+ packageinfo.sh
printf "Updated version: "
- scripts/VersionName
+ scripts/build/VersionName
;;
*)
printf "Next version would be: "
- scripts/VersionName -p ./packageinfo.sh+
+ scripts/build/VersionName -p ./packageinfo.sh+
rm packageinfo.sh+
;;
esac
diff --git a/scripts/VersionName b/scripts/build/VersionName
index 1030196ce392..71e31a948ff0 100755
--- a/scripts/VersionName
+++ b/scripts/build/VersionName
@@ -21,7 +21,13 @@ esac
NAME="$version"
case $point in
[1-9]*)
- NAME="${NAME}p${point}"
+ case "${proto}.${major}" in
+ 4.[012])
+ NAME="${NAME}p${point}"
+ ;;
+ *) NAME="${NAME}.${point}"
+ ;;
+ esac
;;
NEW) ;;
'') ;;
diff --git a/scripts/check--help b/scripts/build/check--help
index 1524675b4473..1524675b4473 100755
--- a/scripts/check--help
+++ b/scripts/build/check--help
diff --git a/scripts/checkChangeLog b/scripts/build/checkChangeLog
index 46c56c44b053..46c56c44b053 100755
--- a/scripts/checkChangeLog
+++ b/scripts/build/checkChangeLog
diff --git a/scripts/build/checkHtmlFileDates b/scripts/build/checkHtmlFileDates
new file mode 100755
index 000000000000..9d9a2f2625d0
--- /dev/null
+++ b/scripts/build/checkHtmlFileDates
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+bk version > /dev/null 2>&1 || exit 0
+
+for i in `find * -type f -name '*.html' -print | grep -v SCCS/`
+do
+ # echo $i
+ set `bk diffs $i | wc -l`
+ lines=$1
+ case "$lines" in
+ 0) ;;
+ *) echo "Processing <$i>"
+ ../scripts/build/updateBEDate $i
+ ;;
+ esac
+done
diff --git a/scripts/fixautomakedepsmagic b/scripts/build/fixautomakedepsmagic
index ec82bba548ca..ec82bba548ca 100644..100755
--- a/scripts/fixautomakedepsmagic
+++ b/scripts/build/fixautomakedepsmagic
diff --git a/scripts/genCommitLog b/scripts/build/genCommitLog
index 318e2866a47d..318e2866a47d 100755
--- a/scripts/genCommitLog
+++ b/scripts/build/genCommitLog
diff --git a/scripts/build/genver b/scripts/build/genver
new file mode 100755
index 000000000000..c07324392cb0
--- /dev/null
+++ b/scripts/build/genver
@@ -0,0 +1,96 @@
+#! /bin/sh
+
+# possible usage: $0 [-f] [version.m4] [version.def]
+#
+# -f would be 'force the update'
+
+force=0
+outputs=
+for i in $*
+do
+ case "$i" in
+ -f)
+ force=1
+ ;;
+ *version.m4)
+ outputs="m4/version.m4 $outputs"
+ ;;
+ *version.def)
+ outputs="include/version.def $outputs"
+ ;;
+ *version.texi)
+ outputs="include/version.texi $outputs"
+ ;;
+ *) echo "Unrecognized option: $i"
+ exit 1
+ ;;
+ esac
+done
+
+case "$outputs" in
+ '') outputs="m4/version.m4 include/version.def include/version.texi" ;;
+esac
+
+set -e
+
+. ../packageinfo.sh
+
+dversion=`../scripts/build/VersionName -p ../packageinfo.sh`
+
+set +e
+
+# Create intermediate files in $TEMPDIR defaulting it to /tmp
+# if not set. This avoids races when multiple builds run in
+# parallel on shared source.
+
+TEMPDIR=${TEMPDIR=/tmp}
+
+case "$outputs" in
+ *version.m4*)
+ echo "m4_define([VERSION_NUMBER],[${dversion}])" > "${TEMPDIR}/version.m4+"
+ cmp -s "${TEMPDIR}/version.m4+" m4/version.m4
+ rc=$?
+ case "$force$rc" in
+ 00)
+ rm -f "${TEMPDIR}/version.m4+"
+ ;;
+ *)
+ mv "${TEMPDIR}/version.m4+" m4/version.m4
+ ;;
+ esac
+ ;;
+esac
+
+case "$outputs" in
+ *version.def*)
+ echo "version = '${dversion}';" > "${TEMPDIR}/version.def+"
+ cmp -s "${TEMPDIR}/version.def+" include/version.def
+ rc=$?
+ case "$force$rc" in
+ 00)
+ rm -f "${TEMPDIR}/version.def+"
+ ;;
+ *)
+ mv "${TEMPDIR}/version.def+" include/version.def
+ ;;
+ esac
+ ;;
+esac
+
+case "$outputs" in
+ *version.texi*)
+ echo "@set UPDATED `date +'%d %B %Y'`" > "${TEMPDIR}/version.texi+"
+ echo "@set EDITION $dversion" >> "${TEMPDIR}/version.texi+"
+ echo "@set VERSION $dversion" >> "${TEMPDIR}/version.texi+"
+ cmp -s "${TEMPDIR}/version.texi+" include/version.texi
+ rc=$?
+ case "$force$rc" in
+ 00)
+ rm -f "${TEMPDIR}/version.texi+"
+ ;;
+ *)
+ mv "${TEMPDIR}/version.texi+" include/version.texi
+ ;;
+ esac
+ ;;
+esac
diff --git a/scripts/mkver.in b/scripts/build/mkver.in
index 4557a044277a..3aef1c816a7f 100644
--- a/scripts/mkver.in
+++ b/scripts/build/mkver.in
@@ -1,4 +1,4 @@
-#!@PATH_SH@
+#!@CONFIG_SHELL@
PROG=${1-UNKNOWN}
ConfStr="$PROG"
@@ -10,11 +10,9 @@ case "$CSET" in
*) ConfStr="$ConfStr@$CSET" ;;
esac
-case "@LCRYPTO@" in
+case "@VER_SUFFIX@" in
'') ;;
- -lcrypto)
- ConfStr="${ConfStr}-o" ;;
- *) ConfStr="${ConfStr}-?" ;;
+ *) ConfStr="${ConfStr}-@VER_SUFFIX@" ;;
esac
ConfStr="$ConfStr `LC_TIME=C TZ=UTC date`"
diff --git a/scripts/build/updateBEDate b/scripts/build/updateBEDate
new file mode 100755
index 000000000000..467e7070af66
--- /dev/null
+++ b/scripts/build/updateBEDate
@@ -0,0 +1,53 @@
+#! /usr/bin/env perl
+use warnings;
+use strict;
+
+# for each filename on the command line
+# get the modtime
+# make a backup of the file
+# - error if there is already a backup?
+# flush the live version(?)
+# start a line-by-line copy of the backup to the new file,
+# doing the BeginDate/EndDate substitution
+
+# <!-- #BeginDate format:En1m -->3-oct-11 18:20<!-- #EndDate -->
+# <!-- #BeginDate format:En2m -->01-Aug-2011 17:56<!-- #EndDate -->
+# without the 'm' no minutes are included.
+
+my $i;
+my $mod_time;
+my $stamp;
+my @m_abbr = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
+
+foreach ( @ARGV ) {
+ $i = $_;
+ $mod_time = (stat ($i))[9];
+ $stamp = localtime($mod_time);
+ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
+ localtime($mod_time);
+ $year += 1900;
+
+ # print "<$i> at <$stamp>\n";
+
+ open(my $IFILE, "<", $i) or die "Cannot open < $i: $!";
+ open(my $OFILE, ">", $i.".new") or die "Cannot open > $i.new: $!";
+ while(<$IFILE>) {
+ if (/(.*<!--\s*#BeginDate\s*format:)(\S*)(\s*-->).*(<!--\s*#EndDate\s*-->.*)/) {
+ # print "Got: $_";
+ # print "as: <$1><$2><$3>...<$4>\n";
+ print { $OFILE } $1,$2,$3;
+ printf { $OFILE } "%s-%s-%s %02d:%02d", $mday,$m_abbr[$mon],$year,$hour,$min;
+ print { $OFILE } $4,"\n";
+ }
+ else {
+ print { $OFILE } $_;
+ }
+ }
+ close($IFILE);
+ close($OFILE);
+ #
+ utime(time, $mod_time, "$i.new") || die "touch $i.new failed: $!";
+ #
+ rename $i,"$i.old" || die "rename $i,$i.old failed: $!";
+ rename "$i.new",$i || die "rename $i.new,$i failed: $!";
+}
diff --git a/scripts/calc_tickadj.in b/scripts/calc_tickadj.in
deleted file mode 100644
index 32eae12964a2..000000000000
--- a/scripts/calc_tickadj.in
+++ /dev/null
@@ -1,38 +0,0 @@
-#! @PATH_PERL@
-#
-# drift of 104.8576 -> +1 tick. Base of 10000 ticks.
-#
-# 970306 HMS Deal with nanoseconds. Fix sign of adjustments.
-
-$df="/etc/ntp.drift";
-# Assumes a 100Hz box with "tick" of 10000
-# Someday, we might call "tickadj" for better values...
-$base=10000; # tick: 1,000,000 / HZ
-$cvt=104.8576; # 2 ** 20 / $base
-$v1=0.;
-$v2="";
-
-if (open(DF, $df))
- {
- if ($_=<DF>)
- {
- ($v1, $v2) = split;
- }
-
- while ($v1 < 0)
- {
- $v1 += $cvt;
- $base--;
- }
-
- while ($v1 > $cvt)
- {
- $v1 -= $cvt;
- $base++;
- }
- }
-
-printf("%.3f (drift)\n", $v1);
-
-printf("%d usec; %d nsec\n", $base, ($base + ($v1/$cvt)) * 1000);
-
diff --git a/scripts/calc_tickadj/Makefile.am b/scripts/calc_tickadj/Makefile.am
new file mode 100644
index 000000000000..b98bc8771898
--- /dev/null
+++ b/scripts/calc_tickadj/Makefile.am
@@ -0,0 +1,104 @@
+NULL=
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+
+bin_SCRIPTS= $(CALC_TICKADJ_DB)
+libexec_SCRIPTS= $(CALC_TICKADJ_DL)
+sbin_SCRIPTS= $(CALC_TICKADJ_DS)
+EXTRA_SCRIPTS= calc_tickadj
+
+man1_MANS=
+man8_MANS=
+manpage_HACK=
+if WANT_CALC_TICKADJ_MS
+man_MANS= calc_tickadj.$(CALC_TICKADJ_MS)
+else
+manpage_HACK+= calc_tickadj.
+# Note that if we don't WANT_CALC_TICKADJ then CALC_TICKADJ_MS will
+# be empty. But we still need the .texi and other files to be built, as
+# they are general prerequisites.
+# The manpage_HACK is listed in noinst_DATA so that takes care of these.
+endif
+
+DISTCLEANFILES = config.log $(man_MANS) calc_tickadj.
+
+EXTRA_DIST = \
+ calc_tickadj.in \
+ calc_tickadj.1calc_tickadjman \
+ calc_tickadj.1calc_tickadjmdoc \
+ calc_tickadj.man.in \
+ calc_tickadj.mdoc.in \
+ calc_tickadj.texi \
+ calc_tickadj.html \
+ calc_tickadj-opts.def \
+ calc_tickadj-opts \
+ invoke-calc_tickadj.texi \
+ invoke-calc_tickadj.menu \
+ $(NULL)
+
+noinst_DATA = \
+ calc_tickadj.1calc_tickadjman \
+ calc_tickadj.1calc_tickadjmdoc \
+ calc_tickadj.man.in \
+ calc_tickadj.mdoc.in \
+ calc_tickadj.texi \
+ calc_tickadj.html \
+ calc_tickadj-opts.def \
+ calc_tickadj-opts \
+ invoke-calc_tickadj.texi \
+ invoke-calc_tickadj.menu \
+ $(manpage_HACK) \
+ $(NULL)
+
+calc_tickadj: $(srcdir)/calc_tickadj-opts
+
+$(srcdir)/calc_tickadj-opts: $(srcdir)/calc_tickadj-opts.def
+ $(run_ag) calc_tickadj-opts.def
+
+### Nroff
+
+$(srcdir)/calc_tickadj.1calc_tickadjman: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1calc_tickadjman -Tagman-cmd.tpl calc_tickadj-opts.def
+
+$(srcdir)/calc_tickadj.man.in: $(srcdir)/calc_tickadj.1calc_tickadjman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjman > $(srcdir)/calc_tickadj.man.in+
+ mv $(srcdir)/calc_tickadj.man.in+ $(srcdir)/calc_tickadj.man.in
+
+### Mdoc
+
+$(srcdir)/calc_tickadj.1calc_tickadjmdoc: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1calc_tickadjmdoc -Tagmdoc-cmd.tpl calc_tickadj-opts.def
+
+$(srcdir)/calc_tickadj.mdoc.in: $(srcdir)/calc_tickadj.1calc_tickadjmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjmdoc > $(srcdir)/calc_tickadj.mdoc.in+
+ mv $(srcdir)/calc_tickadj.mdoc.in+ $(srcdir)/calc_tickadj.mdoc.in
+
+### Manpage
+
+calc_tickadj.$(CALC_TICKADJ_MS): $(srcdir)/calc_tickadj.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=calc_tickadj.$(CALC_TICKADJ_MS)+:$(srcdir)/calc_tickadj.$(MANTAGFMT).in
+ mv calc_tickadj.$(CALC_TICKADJ_MS)+ calc_tickadj.$(CALC_TICKADJ_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-calc_tickadj.menu: $(srcdir)/invoke-calc_tickadj.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-calc_tickadj.texi: $(srcdir)/calc_tickadj-opts $(srcdir)/calc_tickadj-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section calc_tickadj-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/calc_tickadj.html: $(srcdir)/invoke-calc_tickadj.menu $(srcdir)/invoke-calc_tickadj.texi $(srcdir)/calc_tickadj.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o calc_tickadj.html calc_tickadj.texi || true )
diff --git a/scripts/calc_tickadj/Makefile.in b/scripts/calc_tickadj/Makefile.in
new file mode 100644
index 000000000000..be052be8f2eb
--- /dev/null
+++ b/scripts/calc_tickadj/Makefile.in
@@ -0,0 +1,866 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@WANT_CALC_TICKADJ_MS_FALSE@am__append_1 = calc_tickadj.
+subdir = scripts/calc_tickadj
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/calc_tickadj.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = calc_tickadj
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)"
+SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) $(sbin_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(noinst_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
+MAKE_LIBPARSE = @MAKE_LIBPARSE@
+MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
+MAKE_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+bin_SCRIPTS = $(CALC_TICKADJ_DB)
+libexec_SCRIPTS = $(CALC_TICKADJ_DL)
+sbin_SCRIPTS = $(CALC_TICKADJ_DS)
+EXTRA_SCRIPTS = calc_tickadj
+man1_MANS =
+man8_MANS =
+manpage_HACK = $(am__append_1)
+@WANT_CALC_TICKADJ_MS_TRUE@man_MANS = calc_tickadj.$(CALC_TICKADJ_MS)
+# Note that if we don't WANT_CALC_TICKADJ then CALC_TICKADJ_MS will
+# be empty. But we still need the .texi and other files to be built, as
+# they are general prerequisites.
+# The manpage_HACK is listed in noinst_DATA so that takes care of these.
+DISTCLEANFILES = config.log $(man_MANS) calc_tickadj.
+EXTRA_DIST = \
+ calc_tickadj.in \
+ calc_tickadj.1calc_tickadjman \
+ calc_tickadj.1calc_tickadjmdoc \
+ calc_tickadj.man.in \
+ calc_tickadj.mdoc.in \
+ calc_tickadj.texi \
+ calc_tickadj.html \
+ calc_tickadj-opts.def \
+ calc_tickadj-opts \
+ invoke-calc_tickadj.texi \
+ invoke-calc_tickadj.menu \
+ $(NULL)
+
+noinst_DATA = \
+ calc_tickadj.1calc_tickadjman \
+ calc_tickadj.1calc_tickadjmdoc \
+ calc_tickadj.man.in \
+ calc_tickadj.mdoc.in \
+ calc_tickadj.texi \
+ calc_tickadj.html \
+ calc_tickadj-opts.def \
+ calc_tickadj-opts \
+ invoke-calc_tickadj.texi \
+ invoke-calc_tickadj.menu \
+ $(manpage_HACK) \
+ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/calc_tickadj/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/calc_tickadj/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+calc_tickadj: $(top_builddir)/config.status $(srcdir)/calc_tickadj.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS install-libexecSCRIPTS \
+ install-sbinSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-libexecSCRIPTS \
+ uninstall-man uninstall-sbinSCRIPTS
+
+uninstall-man: uninstall-man1 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binSCRIPTS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libexecSCRIPTS install-man install-man1 install-man8 \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinSCRIPTS install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
+ uninstall-libexecSCRIPTS uninstall-man uninstall-man1 \
+ uninstall-man8 uninstall-sbinSCRIPTS
+
+
+calc_tickadj: $(srcdir)/calc_tickadj-opts
+
+$(srcdir)/calc_tickadj-opts: $(srcdir)/calc_tickadj-opts.def
+ $(run_ag) calc_tickadj-opts.def
+
+### Nroff
+
+$(srcdir)/calc_tickadj.1calc_tickadjman: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1calc_tickadjman -Tagman-cmd.tpl calc_tickadj-opts.def
+
+$(srcdir)/calc_tickadj.man.in: $(srcdir)/calc_tickadj.1calc_tickadjman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjman > $(srcdir)/calc_tickadj.man.in+
+ mv $(srcdir)/calc_tickadj.man.in+ $(srcdir)/calc_tickadj.man.in
+
+### Mdoc
+
+$(srcdir)/calc_tickadj.1calc_tickadjmdoc: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1calc_tickadjmdoc -Tagmdoc-cmd.tpl calc_tickadj-opts.def
+
+$(srcdir)/calc_tickadj.mdoc.in: $(srcdir)/calc_tickadj.1calc_tickadjmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjmdoc > $(srcdir)/calc_tickadj.mdoc.in+
+ mv $(srcdir)/calc_tickadj.mdoc.in+ $(srcdir)/calc_tickadj.mdoc.in
+
+### Manpage
+
+calc_tickadj.$(CALC_TICKADJ_MS): $(srcdir)/calc_tickadj.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=calc_tickadj.$(CALC_TICKADJ_MS)+:$(srcdir)/calc_tickadj.$(MANTAGFMT).in
+ mv calc_tickadj.$(CALC_TICKADJ_MS)+ calc_tickadj.$(CALC_TICKADJ_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-calc_tickadj.menu: $(srcdir)/invoke-calc_tickadj.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-calc_tickadj.texi: $(srcdir)/calc_tickadj-opts $(srcdir)/calc_tickadj-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section calc_tickadj-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/calc_tickadj.html: $(srcdir)/invoke-calc_tickadj.menu $(srcdir)/invoke-calc_tickadj.texi $(srcdir)/calc_tickadj.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o calc_tickadj.html calc_tickadj.texi || true )
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/scripts/calc_tickadj/calc_tickadj-opts b/scripts/calc_tickadj/calc_tickadj-opts
new file mode 100644
index 000000000000..c8a8c0d8509d
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj-opts
@@ -0,0 +1,60 @@
+# EDIT THIS FILE WITH CAUTION (calc_tickadj-opts)
+#
+# It has been AutoGen-ed August 31, 2014 at 04:52:46 AM by AutoGen 5.18.4
+# From the definitions calc_tickadj-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'drift-file' => '/etc/ntp/drift',
+ 'tick' => '',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'drift-file|d=s', 'tick|t=i',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467
+USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
+
+ -d, --drift-file=str Ntp drift file to use
+ -t, --tick=num Tick value of this host
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/calc_tickadj/calc_tickadj-opts.def b/scripts/calc_tickadj/calc_tickadj-opts.def
new file mode 100644
index 000000000000..cdb50efebe27
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj-opts.def
@@ -0,0 +1,60 @@
+/* -*- Mode: Text -*- */
+AutoGen Definitions perlopt;
+
+#include autogen-version.def
+
+prog-name = calc_tickadj;
+prog-title = 'Calculates "optimal" value for tick given ntp drift file.';
+package = ntp;
+#include version.def
+
+long-opts;
+gnu-usage;
+
+flag = {
+ name = drift-file;
+ value = d;
+ arg-type = string;
+ arg-default = '/etc/ntp/drift';
+ descrip = 'Ntp drift file to use';
+ doc = 'Use the specified drift file for calculations';
+};
+
+flag = {
+ name = tick;
+ value = t;
+ arg-type = number;
+ descrip = 'Tick value of this host';
+ doc = 'The current tick which to adjustment will be calculated';
+};
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'texi';
+ ds-text = <<- _EndOfDoc
+The @code{calc_tickadj} script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+
+The example output of
+@example
+$ ./calc_tickadj
+81.699 (drift)
+9999 usec; 9999779 nsec
+$ cat /etc/ntp/drift
+-23.159
+@end example
+
+means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of -23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+
+If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+
+@code{calc_tickadj} tries to determine the the tick value by using
+@code{tickadj} program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+ _EndOfDoc;
+};
diff --git a/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
new file mode 100644
index 000000000000..b77ec1cc62f8
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
@@ -0,0 +1,108 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH calc_tickadj 1calc_tickadjman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-4GaOOZ/ag-fHaWNZ)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:36 AM by AutoGen 5.18.5pre4
+.\" From the definitions calc_tickadj-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]calc_tickadj\fP
+\- Calculates optimal value for tick given ntp drift file.
+.SH SYNOPSIS
+\f\*[B-Font]calc_tickadj\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+The \fBcalc_tickadj\fP script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+.sp
+The example output of
+.br
+.in +4
+.nf
+$ ./calc_tickadj
+81.699 (drift)
+9999 usec; 9999779 nsec
+$ cat /etc/ntp/drift
+-23.159
+.in -4
+.fi
+.sp
+means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of \-23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+.sp
+If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+.sp
+\fBcalc_tickadj\fP tries to determine the the tick value by using
+\fBtickadj\fP program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-drift\-file\f[]=\f\*[I-Font]string\f[]
+Ntp drift file to use.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ /etc/ntp/drift
+.sp
+Use the specified drift file for calculations
+.TP
+.NOP \f\*[B-Font]\-t\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-tick\f[]=\f\*[I-Font]number\f[]
+Tick value of this host.
+This option takes an integer number as its argument.
+.sp
+The current tick which to adjustment will be calculated
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBcalc_tickadj\fP
+option definitions.
diff --git a/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
new file mode 100644
index 000000000000..911f0726dc5f
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
@@ -0,0 +1,84 @@
+.Dd December 19 2014
+.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:39 AM by AutoGen 5.18.5pre4
+.\" From the definitions calc_tickadj-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm calc_tickadj
+.Nd Calculates "optimal" value for tick given ntp drift file.
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+The \fBcalc_tickadj\fP script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+.sp
+The example output of
+.Bd -literal -offset indent
+$ ./calc_tickadj
+81.699 (drift)
+9999 usec; 9999779 nsec
+$ cat /etc/ntp/drift
+-23.159
+.Ed
+.sp
+means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of \-23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+.sp
+If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+.sp
+\fBcalc_tickadj\fP tries to determine the the tick value by using
+\fBtickadj\fP program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl d Ar string , Fl \-drift\-file Ns = Ns Ar string
+Ntp drift file to use.
+The default
+.Ar string
+for this option is:
+.ti +4
+ /etc/ntp/drift
+.sp
+Use the specified drift file for calculations
+.It Fl t Ar number , Fl \-tick Ns = Ns Ar number
+Tick value of this host.
+This option takes an integer number as its argument.
+.sp
+The current tick which to adjustment will be calculated
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBcalc_tickadj\fP
+option definitions.
diff --git a/scripts/calc_tickadj/calc_tickadj.html b/scripts/calc_tickadj/calc_tickadj.html
new file mode 100644
index 000000000000..8d0898f2fa05
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.html
@@ -0,0 +1,166 @@
+<html lang="en">
+<head>
+<title>calc_tickadj User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="calc_tickadj User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">calc_tickadj User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#calc_005ftickadj-Description">calc_tickadj Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">calc_tickadj User's Manual</h2>
+
+<p>This document describes the use of the NTP Project's <code>calc_tickadj</code> program.
+This document applies to version 4.2.8 of <code>calc_tickadj</code>.
+
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">calc_tickadj User's Manual</a>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#calc_005ftickadj-Description">calc_tickadj Description</a>: Description
+<li><a accesskey="2" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>: Invoking calc_tickadj
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="calc_005ftickadj-Invocation"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#calc_005ftickadj-Description">calc_tickadj Description</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<h3 class="section">Invoking calc_tickadj</h3>
+
+<p><a name="index-calc_005ftickadj-1"></a><a name="index-Calculates-_0022optimal_0022-value-for-tick-given-ntp-drift-file_002e-2"></a>
+The <code>calc_tickadj</code> script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+
+ <p>The example output of
+<pre class="example"> $ ./calc_tickadj
+ 81.699 (drift)
+ 9999 usec; 9999779 nsec
+ $ cat /etc/ntp/drift
+ -23.159
+</pre>
+ <p>means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of -23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+
+ <p>If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+
+ <p><code>calc_tickadj</code> tries to determine the the tick value by using
+<code>tickadj</code> program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>calc_tickadj</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#calc_005ftickadj-usage">calc_tickadj usage</a>: calc_tickadj help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>: drift-file option (-d)
+<li><a accesskey="3" href="#calc_005ftickadj-tick">calc_tickadj tick</a>: tick option (-t)
+<li><a accesskey="4" href="#calc_005ftickadj-exit-status">calc_tickadj exit status</a>: exit status
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="calc_005ftickadj-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">calc_tickadj help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-calc_005ftickadj-help-3"></a>
+This is the automatically generated usage text for calc_tickadj.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467
+USAGE: calc_tickadj [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
+
+ -d, --drift-file=str Ntp drift file to use
+ -t, --tick=num Tick value of this host
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+</pre>
+ <div class="node">
+<p><hr>
+<a name="calc_005ftickadj-drift_002dfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#calc_005ftickadj-tick">calc_tickadj tick</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#calc_005ftickadj-usage">calc_tickadj usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">drift-file option (-d)</h4>
+
+<p><a name="index-calc_005ftickadj_002ddrift_002dfile-4"></a>
+This is the &ldquo;ntp drift file to use&rdquo; option.
+This option takes a string argument.
+Use the specified drift file for calculations
+<div class="node">
+<p><hr>
+<a name="calc_005ftickadj-tick"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#calc_005ftickadj-exit-status">calc_tickadj exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">tick option (-t)</h4>
+
+<p><a name="index-calc_005ftickadj_002dtick-5"></a>
+This is the &ldquo;tick value of this host&rdquo; option.
+This option takes a number argument.
+The current tick which to adjustment will be calculated
+<div class="node">
+<p><hr>
+<a name="calc_005ftickadj-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#calc_005ftickadj-tick">calc_tickadj tick</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">calc_tickadj exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+
+</body></html>
+
diff --git a/scripts/calc_tickadj/calc_tickadj.in b/scripts/calc_tickadj/calc_tickadj.in
new file mode 100644
index 000000000000..38b826eb2fff
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.in
@@ -0,0 +1,59 @@
+#! @PATH_PERL@ -w
+#
+# drift of 104.8576 -> +1 tick. Base of 10000 ticks.
+#
+# 970306 HMS Deal with nanoseconds. Fix sign of adjustments.
+package calc_tickadj;
+use strict;
+
+exit run(@ARGV) unless caller;
+
+sub run {
+ my $opts;
+ if (!processOptions(\@_, $opts)) {
+ usage(1);
+ };
+ my $drift_file = $opts->{'drift-file'};
+ my $tick = $opts->{'tick'};
+
+ if (!$tick) {
+ my ($fl) = `tickadj`;
+ if (defined $fl && $fl =~ /(?:KERNEL|PRESET)?\s*tick\s+=\s+(\d+)/) {
+ $tick = $1;
+ }
+ else {
+ die "Could not get tick value, try manually with -t/--tick\n";
+ }
+ }
+
+ # Drift file is in PPM where Milion is actually 2**20
+ my $cvt = (2 ** 20) / $tick;
+ my $drift = 0.;
+
+ open my $dfh, $drift_file or die "Could not open $drift_file: $!\n";
+
+ $drift = <$dfh>;
+
+ close $dfh;
+ die "Invalid drift file value <$drift>" if $drift !~ /[+-]?\d+\.?[0-9]+/;
+
+ while ($drift < 0) {
+ $drift += $cvt;
+ $tick--;
+ }
+
+ while ($drift > $cvt) {
+ $drift -= $cvt;
+ $tick++;
+ }
+
+ printf "%.3f (drift)\n", $drift;
+ printf "%d usec; %d nsec\n", $tick, ($tick + ($drift/$cvt)) * 1000;
+
+ return 0;
+}
+
+@calc_tickadj_opts@
+
+1;
+__END__
diff --git a/scripts/calc_tickadj/calc_tickadj.man.in b/scripts/calc_tickadj/calc_tickadj.man.in
new file mode 100644
index 000000000000..b77ec1cc62f8
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.man.in
@@ -0,0 +1,108 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH calc_tickadj 1calc_tickadjman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-4GaOOZ/ag-fHaWNZ)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:36 AM by AutoGen 5.18.5pre4
+.\" From the definitions calc_tickadj-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]calc_tickadj\fP
+\- Calculates optimal value for tick given ntp drift file.
+.SH SYNOPSIS
+\f\*[B-Font]calc_tickadj\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+The \fBcalc_tickadj\fP script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+.sp
+The example output of
+.br
+.in +4
+.nf
+$ ./calc_tickadj
+81.699 (drift)
+9999 usec; 9999779 nsec
+$ cat /etc/ntp/drift
+-23.159
+.in -4
+.fi
+.sp
+means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of \-23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+.sp
+If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+.sp
+\fBcalc_tickadj\fP tries to determine the the tick value by using
+\fBtickadj\fP program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-drift\-file\f[]=\f\*[I-Font]string\f[]
+Ntp drift file to use.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ /etc/ntp/drift
+.sp
+Use the specified drift file for calculations
+.TP
+.NOP \f\*[B-Font]\-t\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-tick\f[]=\f\*[I-Font]number\f[]
+Tick value of this host.
+This option takes an integer number as its argument.
+.sp
+The current tick which to adjustment will be calculated
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBcalc_tickadj\fP
+option definitions.
diff --git a/scripts/calc_tickadj/calc_tickadj.mdoc.in b/scripts/calc_tickadj/calc_tickadj.mdoc.in
new file mode 100644
index 000000000000..911f0726dc5f
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.mdoc.in
@@ -0,0 +1,84 @@
+.Dd December 19 2014
+.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:39 AM by AutoGen 5.18.5pre4
+.\" From the definitions calc_tickadj-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm calc_tickadj
+.Nd Calculates "optimal" value for tick given ntp drift file.
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+The \fBcalc_tickadj\fP script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+.sp
+The example output of
+.Bd -literal -offset indent
+$ ./calc_tickadj
+81.699 (drift)
+9999 usec; 9999779 nsec
+$ cat /etc/ntp/drift
+-23.159
+.Ed
+.sp
+means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of \-23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+.sp
+If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+.sp
+\fBcalc_tickadj\fP tries to determine the the tick value by using
+\fBtickadj\fP program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl d Ar string , Fl \-drift\-file Ns = Ns Ar string
+Ntp drift file to use.
+The default
+.Ar string
+for this option is:
+.ti +4
+ /etc/ntp/drift
+.sp
+Use the specified drift file for calculations
+.It Fl t Ar number , Fl \-tick Ns = Ns Ar number
+Tick value of this host.
+This option takes an integer number as its argument.
+.sp
+The current tick which to adjustment will be calculated
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBcalc_tickadj\fP
+option definitions.
diff --git a/scripts/calc_tickadj/calc_tickadj.texi b/scripts/calc_tickadj/calc_tickadj.texi
new file mode 100644
index 000000000000..d15b428eca7f
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.texi
@@ -0,0 +1,37 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename calc_tickadj.info
+@settitle calc_tickadj User's Manual
+@include ../../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{calc_tickadj}, a program from the NTP
+Project, that is used calculate optimal tick value based on given drift file.
+@end ifinfo
+
+@direntry
+* calc_tickadj: (calc_tickadj). Calculate optimal tick value from a drift file.
+@end direntry
+
+@titlepage
+@title calc_tickadj User's Manual
+@subtitle calc_tickadj, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@node Top, calc_tickadj Description, (dir), (dir)
+@top calc_tickadj User's Manual
+
+This document describes the use of the NTP Project's @code{calc_tickadj} program.
+This document applies to version @value{VERSION} of @code{calc_tickadj}.
+
+@shortcontents
+
+@menu
+* calc_tickadj Description:: Description
+* calc_tickadj Invocation:: Invoking calc_tickadj
+@end menu
+
+@include invoke-calc_tickadj.texi
diff --git a/scripts/calc_tickadj/invoke-calc_tickadj.menu b/scripts/calc_tickadj/invoke-calc_tickadj.menu
new file mode 100644
index 000000000000..865a0d72d414
--- /dev/null
+++ b/scripts/calc_tickadj/invoke-calc_tickadj.menu
@@ -0,0 +1 @@
+* calc_tickadj Invocation:: Invoking calc_tickadj
diff --git a/scripts/calc_tickadj/invoke-calc_tickadj.texi b/scripts/calc_tickadj/invoke-calc_tickadj.texi
new file mode 100644
index 000000000000..93585e5247f4
--- /dev/null
+++ b/scripts/calc_tickadj/invoke-calc_tickadj.texi
@@ -0,0 +1,102 @@
+@node calc_tickadj Invocation
+@section Invoking calc_tickadj
+@pindex calc_tickadj
+@cindex Calculates "optimal" value for tick given ntp drift file.
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-calc_tickadj.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:44:41 AM by AutoGen 5.18.5pre4
+# From the definitions calc_tickadj-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+The @code{calc_tickadj} script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+
+The example output of
+@example
+$ ./calc_tickadj
+81.699 (drift)
+9999 usec; 9999779 nsec
+$ cat /etc/ntp/drift
+-23.159
+@end example
+
+means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of -23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+
+If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+
+@code{calc_tickadj} tries to determine the the tick value by using
+@code{tickadj} program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{calc_tickadj} program.
+
+@menu
+* calc_tickadj usage:: calc_tickadj help/usage (@option{--help})
+* calc_tickadj drift-file:: drift-file option (-d)
+* calc_tickadj tick:: tick option (-t)
+* calc_tickadj exit status:: exit status
+@end menu
+
+@node calc_tickadj usage
+@subsection calc_tickadj help/usage (@option{--help})
+@cindex calc_tickadj help
+
+This is the automatically generated usage text for calc_tickadj.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467
+USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
+
+ -d, --drift-file=str Ntp drift file to use
+ -t, --tick=num Tick value of this host
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+@end example
+@exampleindent 4
+
+@node calc_tickadj drift-file
+@subsection drift-file option (-d)
+@cindex calc_tickadj-drift-file
+
+This is the ``ntp drift file to use'' option.
+This option takes a string argument.
+Use the specified drift file for calculations
+@node calc_tickadj tick
+@subsection tick option (-t)
+@cindex calc_tickadj-tick
+
+This is the ``tick value of this host'' option.
+This option takes a number argument.
+The current tick which to adjustment will be calculated
+@node calc_tickadj exit status
+@subsection calc_tickadj exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
diff --git a/scripts/checktime.in b/scripts/checktime.in
deleted file mode 100644
index 2fe8f711bc82..000000000000
--- a/scripts/checktime.in
+++ /dev/null
@@ -1,79 +0,0 @@
-#! @PATH_PERL@
-#! @PATH_PERL@ -d
-#
-# This script compares the time of several machines with the
-# time on the local host.
-#
-# Use or modify it as you wish.
-#
-# As the original author is only expecting 14 minutes of fame,
-# leaving his name attached would be appreciated.
-#
-# R. Gary Cutbill <rgary@chrysalis.com>
-# 21 April 1999
-#
-$tol=2.0;
-$|=1;
-print "Time Check";
-
-open(HOSTS,"ypcat hosts.byaddr |"); # get a list of hosts from the yp server.
-
-while ($line=<HOSTS>) { # loop for each host getting the offset compared to localhost
- ($addr,$host,$aliases)=split(/\s+/,$line,3);
- $res=`/usr/local/bin/ntptrace -m 1 -r 1 -t 1 $host`;
- print ".";
- chop $res;
- push (@results,$res);
-}
-print "\n";
-
-
-#
-# Sort the list of hosts, and print out there offsets
-# from the local host.
-#
-@list=sort appropriately @results;
-foreach $i ( @list ) {
-
- @dargs=split(/\s+/,$i);
- if ( $dargs[1] eq "\*Timeout\*" ) {
- print "$i\n";
- chop $dargs[0];
- push(@down,$dargs[0]);
- } else {
- printf "%-25s %7s %3s %6s %10s %5s %8s %8s\n",@dargs;
- if ( ( $dargs[4] > $tol ) || ( $dargs[4] < -$tol ) ) {
- chop $dargs[0];
- push(@toofarout,$dargs[0]); }
- }
-}
-#
-# When the above list finishes, hosts that are different by +/- $tol (two seconds)
-# are in @toofarout. Hosts that are down are in @down. They are treated the same
-# way here, but you might want to do something different depending on your site.
-#
-# print a set of suggested rsh commands to run on the hosts that
-# don't have "good" time. "restartntp" is left as an excersize to the reader.
-# I usually use it to kill a running xntpd, ntpdate some server, and the start xntp
-# again.
-#
-print "\nConsider:\n";
-foreach $i ( (@down,@toofarout) ) {
- print " rsh $i sudo restartntp\n";
-}
-
-
-#
-# sort the results from the list. First by stratum, then by time deviation
-# Put hosts that didn't respond (timed out) on the bottom.
-#
-sub appropriately {
- @af=split(/\s+/,$a);
- @bf=split(/\s+/,$b);
- $aba= ($af[4]<0)?-$af[4]:$af[4];
- $abb= ($bf[4]<0)?-$bf[4]:$bf[4];
-
- ( $af[1] ne $bf[1] ) ? $bf[1] cmp $af[1] :
- ( ( $af[2] != $bf[2] ) ? ( $bf[2] <=> $af[2] ) :
- ( ( $aba != $abb ) ? ( $abb <=> $aba ) : ($af[0] cmp $bf[0] ) ) );
-}
diff --git a/scripts/cvo.sh b/scripts/cvo.sh
deleted file mode 100755
index a8d00ef6cb4f..000000000000
--- a/scripts/cvo.sh
+++ /dev/null
@@ -1,150 +0,0 @@
-#! /bin/sh
-
-# Copyright 2002, 2009, 2010 Harlan Stenn. Used by NTP with permission.
-# Author: Harlan Stenn <harlan+cvo@pfcs.com>
-
-# Possible output formats:
-#
-# CVO=... Shell variable
-# CVO=... ; export CVO Old-style exported envariable
-# export CVO=... New-style exported envariable
-# setenv CVO ... csh-style exported envariable
-
-TS="$*"
-
-CVO_raw=`config.guess`
-CVO=$CVO_raw
-
-set 1 `echo $CVO | tr '-' ' '`
-shift
-
-case "$#" in
- 4) # eg: i686-pc-linux-gnu
- CVO_CPU=$1
- CVO_VENDOR=$2
- cvo_KERN=$3 # Note the capitalization...
- CVO_OS=$4
- case "$cvo_KERN" in
- linux) # Braindamage. We want OS, not kernel info
- if lsb_release > /dev/null 2>&1
- then
- CVO_OS=`lsb_release --id --short | tr '[:upper:]' '[:lower:]'`
- CVO_OS="$CVO_OS`lsb_release --release --short`"
- elif test -f /etc/debian_version
- then
- set `cat /etc/debian_version`
- CVO_OS=debian$1
- CVO_KOSVER=`uname -r`
- elif test -f /etc/mandrake-release
- then
- set `cat /etc/mandrake-release`
- CVO_OS=mandrake$4
- CVO_KOSVER=`uname -r`
- elif test -f /etc/redhat-release
- then
- set `cat /etc/redhat-release`
- case "$1" in
- CentOS)
- CVO_OS=centos$3
- ;;
- Fedora)
- CVO_OS=fedora$3
- ;;
- *)
- case "$3" in
- Enterprise)
- CVO_OS=redhat$7.E
- ;;
- Linux)
- CVO_OS=redhat$5
- ;;
- esac
- ;;
- esac
- CVO_KOSVER=`uname -r`
- elif test -f /etc/slackware-version
- then
- set `cat /etc/slackware-version`
- CVO_OS=slackware$2
- CVO_KOSVER=`uname -r`
- elif test -f /etc/SuSE-release
- then
- set `cat /etc/SuSE-release`
- CVO_OS=suse$9
- CVO_KOSVER=`uname -r`
- else
- CVO_OS=$cvo_KERN`uname -r`
-
- fi
- ;;
- nto) # QNX
- CVO_KOSVER=`uname -r`
- ;;
- *)
- echo "gronk - I don't understand <$CVO>!"
- exit 1
- ;;
- esac
- ;;
- 3) CVO_CPU=$1
- CVO_VENDOR=$2
- CVO_OS=$3
- ;;
- *) echo "gronk - config.guess returned $# pieces, not 3 pieces!"
- exit 1
- ;;
-esac
-
-case "$CVO_OS" in
- cygwin)
- # Decisions, decisions.
- # uname -r is the cygwin version #, eg: 1.3.3(0.46/3/2)
- # uname -s returns something like CYGWIN_NT-5.0
- CVO_OS="$CVO_OS`uname -r | sed 's/(.*//'`"
- ;;
-esac
-set `echo $CVO_OS | sed 's/\([0-9]\)/ \1/'`
-
-case "$#" in
- 2) ;;
- *) echo "gronk - <$CVO_OS> expanded to $#, not 2 pieces!"
- exit 1
- ;;
-esac
-
-CVO_OSNAME=$1
-CVO_OSVER=$2
-
-case "$CVO_OSNAME" in
- solaris)
- CVO_KOSVER=`uname -v`
- ;;
-esac
-
-CVO=$CVO_CPU-$CVO_VENDOR-$CVO_OS
-
-case "$TS" in
- '')
- set | grep CVO
- ;;
- *)
- # keys['cvo'] = "cvo.CVO['CVO']"
- TS=`echo $TS | sed -e s/@cvo@/$CVO/g`
- # keys['cpu'] = "cvo.CVO['CVO_CPU']"
- TS=`echo $TS | sed -e s/@cpu@/$CVO_CPU/g`
- # keys['kosver'] = "cvo.CVO['CVO_KOSVER']"
- TS=`echo $TS | sed -e s/@kosver@/$CVO_KOSVER/g`
- # keys['os'] = "cvo.CVO['CVO_OS']"
- TS=`echo $TS | sed -e s/@os@/$CVO_OS/g`
- # keys['osname'] = "cvo.CVO['CVO_OSNAME']"
- TS=`echo $TS | sed -e s/@osname@/$CVO_OSNAME/g`
- # keys['osver'] = "cvo.CVO['CVO_OSVER']"
- TS=`echo $TS | sed -e s/@osver@/$CVO_OSVER/g`
- # keys['vendor'] = "cvo.CVO['CVO_VENDOR']"
- TS=`echo $TS | sed -e s/@vendor@/$CVO_VENDOR/g`
- # keys['raw'] = "cvo.CVO['CVO_raw']"
- TS=`echo $TS | sed -e s/@raw@/$CVO_raw/g`
-
- echo $TS
- ;;
-esac
diff --git a/scripts/freq_adj.in b/scripts/deprecated/freq_adj.in
index 88eb390e1db6..88eb390e1db6 100644
--- a/scripts/freq_adj.in
+++ b/scripts/deprecated/freq_adj.in
diff --git a/scripts/hpadjtime.sh b/scripts/deprecated/hpadjtime.sh
index 3de2a4093046..3de2a4093046 100755
--- a/scripts/hpadjtime.sh
+++ b/scripts/deprecated/hpadjtime.sh
diff --git a/scripts/html2man.in b/scripts/deprecated/html2man.in
index 2f5fb3f9935e..adc484820a08 100755
--- a/scripts/html2man.in
+++ b/scripts/deprecated/html2man.in
@@ -19,21 +19,21 @@ $MANDIR = "./man";
# HTML files to convert. Also include per-file info here:
# name of man page, man section, 'see also' section
%manfiles = (
- 'ntpd' => ['ntpd', 8, 'ntp.conf(5), ntpq(8), ntpdc(8)'],
- 'ntpq' => ['ntpq', 8, 'ntp_decode(5), ntpd(8), ntpdc(8)'],
- 'ntpdate' => ['ntpdate', 8, 'ntpd(8)'],
- 'ntpdc' => ['ntpdc', 8, 'ntpd(8)'],
- 'ntptime' => ['ntptime', 8, 'ntpd(8), ntpdate(8)'],
- 'ntptrace' => ['ntptrace', 8, 'ntpd(8)'],
- 'ntp-wait' => ['ntp-wait', 8, 'ntpd(8)'],
- 'keygen' => ['ntp-keygen', 8, 'ntpd(8), ntp_auth(5)'],
- 'tickadj' => ['tickadj', 8, 'ntpd(8)'],
- 'confopt' => ['ntp.conf', 5, 'ntpd(8), ntp_auth(5), ntp_mon(5), ntp_acc(5), ntp_clock(5), ntp_misc(5)'],
- 'authopt' => ['ntp_auth', 5, 'ntp.conf(5), ntpd(8)'],
+ 'ntpd' => ['ntpd', @NTPD_MS@, 'ntp.conf(5), ntpq(@NTPQ_MS@), ntpdc(@NTPDC_MS@)'],
+ 'ntpq' => ['ntpq', @NTPQ_MS@, 'ntp_decode(5), ntpd(@NTPD_MS@), ntpdc(@NTPDC_MS@)'],
+ 'ntpdate' => ['ntpdate', @NTPDATE_MS@, 'ntpd(@NTPD_MS@)'],
+ 'ntpdc' => ['ntpdc', @NTPDC_MS@, 'ntpd(@NTPD_MS@)'],
+ 'ntptime' => ['ntptime', @NTPTIME_MS@, 'ntpd(@NTPD_MS@), ntpdate(@NTPDATE_MS@)'],
+ 'ntptrace' => ['ntptrace', @NTPTRACE_MS@, 'ntpd(@NTPD_MS@)'],
+ 'ntp-wait' => ['ntp-wait', @NTP_WAIT_MS@, 'ntpd(@NTPD_MS@)'],
+ 'keygen' => ['ntp-keygen', @NTP_KEYGEN_MS@, 'ntpd(@NTPD_MS@), ntp_auth(5)'],
+ 'tickadj' => ['tickadj', @TICKADJ_MS@, 'ntpd(@NTPD_MS@)'],
+ 'confopt' => ['ntp.conf', 5, 'ntpd(@NTPD_MS@), ntp_auth(5), ntp_mon(5), ntp_acc(5), ntp_clock(5), ntp_misc(5)'],
+ 'authopt' => ['ntp_auth', 5, 'ntp.conf(5), ntpd(@NTPD_MS@)'],
'monopt' => ['ntp_mon', 5, 'ntp.conf(5), ntp_decode(5)'],
'accopt' => ['ntp_acc', 5, 'ntp.conf(5)'],
'clockopt' => ['ntp_clock', 5, 'ntp.conf(5)'],
- 'decode' => ['ntp_decode', 5, 'ntpq(8), ntp_mon(5)'],
+ 'decode' => ['ntp_decode', 5, 'ntpq(@NTPQ_MS@), ntp_mon(5)'],
'miscopt' => ['ntp_misc', 5, 'ntp.conf(5)']);
%table_headers = (
diff --git a/scripts/ntp-close b/scripts/deprecated/ntp-close
index b5077e67142c..b5077e67142c 100755
--- a/scripts/ntp-close
+++ b/scripts/deprecated/ntp-close
diff --git a/scripts/ntp-groper b/scripts/deprecated/ntp-groper
index 1fd0cfe4c2d6..1fd0cfe4c2d6 100755
--- a/scripts/ntp-groper
+++ b/scripts/deprecated/ntp-groper
diff --git a/scripts/ntp-restart b/scripts/deprecated/ntp-restart
index 0a1d58a5c56c..0a1d58a5c56c 100755
--- a/scripts/ntp-restart
+++ b/scripts/deprecated/ntp-restart
diff --git a/scripts/ntp-status b/scripts/deprecated/ntp-status
index 4109124eedb6..4109124eedb6 100755
--- a/scripts/ntp-status
+++ b/scripts/deprecated/ntp-status
diff --git a/scripts/genver b/scripts/genver
deleted file mode 100755
index ddf25cd41536..000000000000
--- a/scripts/genver
+++ /dev/null
@@ -1,88 +0,0 @@
-#! /bin/sh
-
-# possible usage: $0 [-f] [version.m4] [version.def]
-#
-# -f would be 'force the update'
-
-force=0
-outputs=
-for i in $*
-do
- case "$i" in
- -f) force=1 ;;
- version.m4)
- outputs="version.m4 $outputs"
- ;;
- *version.def)
- outputs="include/version.def $outputs"
- ;;
- *version.texi)
- outputs="include/version.texi $outputs"
- ;;
- *) echo "Unrecognized option: $i"
- exit 1
- ;;
- esac
-done
-
-case "$outputs" in
- '') outputs="version.m4 include/version.def include/version.texi" ;;
-esac
-
-set -e
-
-. ./packageinfo.sh
-
-dversion=`scripts/VersionName`
-
-set +e
-
-case "$outputs" in
- *version.m4*)
- echo "m4_define([VERSION_NUMBER],[${dversion}])" > /tmp/version.m4+
- cmp -s /tmp/version.m4+ version.m4
- rc=$?
- case "$force$rc" in
- 00)
- rm -f /tmp/version.m4+
- ;;
- *)
- mv /tmp/version.m4+ version.m4
- ;;
- esac
- ;;
-esac
-
-case "$outputs" in
- *version.def*)
- echo "version = '${dversion}';" > /tmp/version.def+
- cmp -s /tmp/version.def+ include/version.def
- rc=$?
- case "$force$rc" in
- 00)
- rm -f /tmp/version.def+
- ;;
- *)
- mv /tmp/version.def+ include/version.def
- ;;
- esac
- ;;
-esac
-
-case "$outputs" in
- *version.texi*)
- echo "@set UPDATED `date +'%d %B %Y'`" > /tmp/version.texi+
- echo "@set EDITION $dversion" >> /tmp/version.texi+
- echo "@set VERSION $dversion" >> /tmp/version.texi+
- cmp -s /tmp/version.texi+ include/version.texi
- rc=$?
- case "$force$rc" in
- 00)
- rm -f /tmp/version.texi+
- ;;
- *)
- mv /tmp/version.texi+ include/version.texi
- ;;
- esac
- ;;
-esac
diff --git a/scripts/invoke-plot_summary.menu b/scripts/invoke-plot_summary.menu
new file mode 100644
index 000000000000..b287f20a040e
--- /dev/null
+++ b/scripts/invoke-plot_summary.menu
@@ -0,0 +1 @@
+* plot_summary Invocation:: Invoking plot_summary
diff --git a/scripts/invoke-plot_summary.texi b/scripts/invoke-plot_summary.texi
new file mode 100644
index 000000000000..d78ca9304afd
--- /dev/null
+++ b/scripts/invoke-plot_summary.texi
@@ -0,0 +1,121 @@
+@node plot_summary Invocation
+@section Invoking plot_summary
+@pindex plot_summary
+@cindex plot statistics generated by summary script
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-plot_summary.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:45:15 AM by AutoGen 5.18.5pre4
+# From the definitions plot_summary-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{plot_summary} program.
+
+@menu
+* plot_summary usage:: plot_summary help/usage (@option{--help})
+* plot_summary directory:: directory option
+* plot_summary identifier:: identifier option
+* plot_summary peer:: peer option
+* plot_summary plot-term:: plot-term option
+* plot_summary output-file:: output-file option
+* plot_summary exit status:: exit status
+@end menu
+
+@node plot_summary usage
+@subsection plot_summary help/usage (@option{--help})
+@cindex plot_summary help
+
+This is the automatically generated usage text for plot_summary.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8
+USAGE: plot_summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
+
+ --directory=str Where the summary files are
+ --identifier=str Origin of the data
+ --offset-limit=float Limit of absolute offset
+ --peer=str Peers to generate plots for
+ - may appear multiple times
+ --plot-term=str Gnuplot terminal
+ --output-file=str Output file
+ --dont-wait Don't wait for keystroke between plots
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+@end example
+@exampleindent 4
+
+@node plot_summary directory
+@subsection directory option
+@cindex plot_summary-directory
+
+This is the ``where the summary files are'' option.
+This option takes a string argument.
+ The directory where the @code{plot_summary} will search for the
+ *_summary files generated by @code{summary} script.
+@node plot_summary identifier
+@subsection identifier option
+@cindex plot_summary-identifier
+
+This is the ``origin of the data'' option.
+This option takes a string argument.
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+@node plot_summary peer
+@subsection peer option
+@cindex plot_summary-peer
+
+This is the ``peers to generate plots for'' option.
+This option takes a string argument.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
+
+ By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+@node plot_summary plot-term
+@subsection plot-term option
+@cindex plot_summary-plot-term
+
+This is the ``gnuplot terminal'' option.
+This option takes a string argument.
+ This is string is passed directly to the @code{gnuplot set terminal}
+ command. Default is @code{x11} if @code{DISPLAY} is set and
+ @code{dumb} is it's not'. See output from @code(gnuplot -e "set
+ terminal") for the list of avalaible options.
+@node plot_summary output-file
+@subsection output-file option
+@cindex plot_summary-output-file
+
+This is the ``output file'' option.
+This option takes a str argument.
+ Output file for @code{gnuplot}, default to stdout.
+@node plot_summary exit status
+@subsection plot_summary exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
diff --git a/scripts/invoke-summary.menu b/scripts/invoke-summary.menu
new file mode 100644
index 000000000000..f6adfe1d1bf3
--- /dev/null
+++ b/scripts/invoke-summary.menu
@@ -0,0 +1 @@
+* summary Invocation:: Invoking summary
diff --git a/scripts/invoke-summary.texi b/scripts/invoke-summary.texi
new file mode 100644
index 000000000000..289490d73143
--- /dev/null
+++ b/scripts/invoke-summary.texi
@@ -0,0 +1,103 @@
+@node summary Invocation
+@section Invoking summary
+@pindex summary
+@cindex compute various stastics from NTP stat files
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-summary.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:45:21 AM by AutoGen 5.18.5pre4
+# From the definitions summary-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+
+
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{summary} program.
+
+@menu
+* summary usage:: summary help/usage (@option{--help})
+* summary directory:: directory option
+* summary end-date:: end-date option
+* summary output-directory:: output-directory option
+* summary start-date:: start-date option
+* summary exit status:: exit status
+@end menu
+
+@node summary usage
+@subsection summary help/usage (@option{--help})
+@cindex summary help
+
+This is the automatically generated usage text for summary.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+summary - compute various stastics from NTP stat files - Ver. 4.2.8
+USAGE: summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
+
+ --directory=str Directory containing stat files
+ --end-date=num End date
+ --output-directory=str Output directory
+ --peer-dist-limit=float Peer dist limit
+ --skip-time-steps=float Ignore time offsets larger that this
+ --start-date=num Start date
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+@end example
+@exampleindent 4
+
+@node summary directory
+@subsection directory option
+@cindex summary-directory
+
+This is the ``directory containing stat files'' option.
+This option takes a string argument.
+ The directory where @code{ntpd} will search for .stat files generated
+ by @code{ntpd}.
+@node summary end-date
+@subsection end-date option
+@cindex summary-end-date
+
+This is the ``end date'' option.
+This option takes a number argument.
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use @code{date -u +%Y%m%d})
+ to get the timestamp.
+@node summary output-directory
+@subsection output-directory option
+@cindex summary-output-directory
+
+This is the ``output directory'' option.
+This option takes a str argument.
+ The output directory @code{summary} will write all output files to.
+@node summary start-date
+@subsection start-date option
+@cindex summary-start-date
+
+This is the ``start date'' option.
+This option takes a num argument.
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+@node summary exit status
+@subsection summary exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
diff --git a/scripts/lib/Makefile.am b/scripts/lib/Makefile.am
new file mode 100644
index 000000000000..d7c0c0e2c544
--- /dev/null
+++ b/scripts/lib/Makefile.am
@@ -0,0 +1,5 @@
+perllibdir = @PERLLIBDIR@
+
+nobase_perllib_DATA = NTP/Util.pm
+
+EXTRA_DIST = ${nobase_perllib_DATA}
diff --git a/scripts/lib/Makefile.in b/scripts/lib/Makefile.in
new file mode 100644
index 000000000000..9d460e1cadc7
--- /dev/null
+++ b/scripts/lib/Makefile.in
@@ -0,0 +1,584 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = scripts/lib
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(perllibdir)"
+DATA = $(nobase_perllib_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
+MAKE_LIBPARSE = @MAKE_LIBPARSE@
+MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
+MAKE_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+perllibdir = @PERLLIBDIR@
+nobase_perllib_DATA = NTP/Util.pm
+EXTRA_DIST = ${nobase_perllib_DATA}
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/lib/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/lib/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-nobase_perllibDATA: $(nobase_perllib_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(perllibdir)" || $(MKDIR_P) "$(DESTDIR)$(perllibdir)"
+ @list='$(nobase_perllib_DATA)'; test -n "$(perllibdir)" || list=; \
+ $(am__nobase_list) | while read dir files; do \
+ xfiles=; for file in $$files; do \
+ if test -f "$$file"; then xfiles="$$xfiles $$file"; \
+ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
+ test -z "$$xfiles" || { \
+ test "x$$dir" = x. || { \
+ echo "$(MKDIR_P) '$(DESTDIR)$(perllibdir)/$$dir'"; \
+ $(MKDIR_P) "$(DESTDIR)$(perllibdir)/$$dir"; }; \
+ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(perllibdir)/$$dir'"; \
+ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(perllibdir)/$$dir" || exit $$?; }; \
+ done
+
+uninstall-nobase_perllibDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nobase_perllib_DATA)'; test -n "$(perllibdir)" || list=; \
+ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(perllibdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(perllibdir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(perllibdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_perllibDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-nobase_perllibDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man \
+ install-nobase_perllibDATA install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-nobase_perllibDATA
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/scripts/lib/NTP/Util.pm b/scripts/lib/NTP/Util.pm
new file mode 100644
index 000000000000..66f2453bf0cf
--- /dev/null
+++ b/scripts/lib/NTP/Util.pm
@@ -0,0 +1,137 @@
+package NTP::Util;
+use strict;
+use warnings;
+use Exporter 'import';
+use Carp;
+use version 0.77;
+
+our @EXPORT_OK = qw(ntp_read_vars do_dns ntp_peers ntp_sntp_line);
+
+my $ntpq_path = 'ntpq';
+my $sntp_path = 'sntp';
+
+our $IP_AGNOSTIC;
+
+BEGIN {
+ require Socket;
+ if (version->parse($Socket::VERSION) >= version->parse(1.94)) {
+ Socket->import(qw(getaddrinfo getnameinfo SOCK_RAW AF_INET));
+ $IP_AGNOSTIC = 1;
+ }
+ else {
+ Socket->import(qw(inet_aton SOCK_RAW AF_INET));
+ }
+}
+
+my %obsolete_vars = (
+ phase => 'offset',
+ rootdispersion => 'rootdisp',
+);
+
+sub ntp_read_vars {
+ my ($peer, $vars, $host) = @_;
+ my $do_all = !@$vars;
+ my %out_vars = map {; $_ => undef } @$vars;
+
+ $out_vars{status_line} = {} if $do_all;
+
+ my $cmd = "$ntpq_path -n -c 'rv $peer ".(join ',', @$vars)."'";
+ $cmd .= " $host" if defined $host;
+ $cmd .= " |";
+
+ open my $fh, $cmd or croak "Could not start ntpq: $!";
+
+ while (<$fh>) {
+ return undef if /Connection refused/;
+
+ if (/^asso?c?id=0 status=(\S{4}) (\S+), (\S+),/gi) {
+ $out_vars{status_line}{status} = $1;
+ $out_vars{status_line}{leap} = $2;
+ $out_vars{status_line}{sync} = $3;
+ }
+
+ while (/(\w+)=([^,]+),?\s/g) {
+ my ($var, $val) = ($1, $2);
+ $val =~ s/^"([^"]+)"$/$1/;
+ $var = $obsolete_vars{$var} if exists $obsolete_vars{$var};
+ if ($do_all) {
+ $out_vars{$var} = $val
+ }
+ else {
+ $out_vars{$var} = $val if exists $out_vars{$var};
+ }
+ }
+ }
+
+ close $fh or croak "running ntpq failed: $! (exit status $?)";
+ return \%out_vars;
+}
+
+sub do_dns {
+ my ($host) = @_;
+
+ if ($IP_AGNOSTIC) {
+ my ($err, $res);
+
+ ($err, $res) = getaddrinfo($host, '', {socktype => SOCK_RAW});
+ die "getaddrinfo failed: $err\n" if $err;
+
+ ($err, $res) = getnameinfo($res->{addr}, 0);
+ die "getnameinfo failed: $err\n" if $err;
+
+ return $res;
+ }
+ # Too old perl, do only ipv4
+ elsif ($host =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/) {
+ return gethostbyaddr inet_aton($host), AF_INET;
+ }
+ else {
+ return;
+ }
+}
+
+sub ntp_peers {
+ my ($host) = @_;
+
+ my $cmd = "$ntpq_path -np $host |";
+
+ open my $fh, $cmd or croak "Could not start ntpq: $!";
+
+ <$fh> for 1 .. 2;
+
+ my @columns = qw(remote refid st t when poll reach delay offset jitter);
+ my @peers;
+ while (<$fh>) {
+ if (/(?:[\w\.\*-]+\s*){10}/) {
+ my $col = 0;
+ push @peers, { map {; $columns[ $col++ ] => $_ } split /(?<=.)\s+/ };
+ }
+ else {
+ #TODO return error (but not needed anywhere now)
+ warn "ERROR: $_";
+ }
+ }
+
+ close $fh or croak "running ntpq failed: $! (exit status $?)";
+ return \@peers;
+}
+
+# TODO: we don't need this but it would be nice to have all the line parsed
+sub ntp_sntp_line {
+ my ($host) = @_;
+
+ my $cmd = "$sntp_path $host |";
+ open my $fh, $cmd or croak "Could not start sntp: $!";
+
+ my ($offset, $stratum);
+ while (<$fh>) {
+ next if !/^\d{4}-\d\d-\d\d/;
+ chomp;
+ my @output = split / /;
+
+ $offset = $output[3];
+ ($stratum = pop @output) =~ s/s(\d{1,2})/$1/;
+ }
+ close $fh or croak "running sntp failed: $! (exit status $?)";
+ return ($offset, $stratum);
+}
diff --git a/scripts/monitoring/ntp.pl b/scripts/monitoring/ntp.pl
index b23f396ee024..3478f71bc709 100644
--- a/scripts/monitoring/ntp.pl
+++ b/scripts/monitoring/ntp.pl
@@ -148,24 +148,34 @@ sub ssw_SECode { return $_[$[] & 0xf; }
%LI = ( 0, "leap_none", 1, "leap_add_sec", 2, "leap_del_sec", 3, "sync_alarm", "-", "leap");
%ClockSource = (0, "sync_unspec",
- 1, "sync_lf_clock",
- 2, "sync_uhf_clock",
+ 1, "sync_pps",
+ 2, "sync_lf_clock",
3, "sync_hf_clock",
- 4, "sync_local_proto",
- 5, "sync_ntp",
- 6, "sync_udp/time",
- 7, "sync_wristwatch",
+ 4, "sync_uhf_clock",
+ 5, "sync_local_proto",
+ 6, "sync_ntp",
+ 7, "sync_udp/time",
+ 8, "sync_wristwatch",
+ 9, "sync_telephone",
"-", "ClockSource",
);
%SystemEvent = (0, "event_unspec",
- 1, "event_restart",
- 2, "event_fault",
- 3, "event_sync_chg",
- 4, "event_sync/strat_chg",
- 5, "event_clock_reset",
- 6, "event_bad_date",
- 7, "event_clock_excptn",
+ 1, "event_freq_not_set",
+ 2, "event_freq_set",
+ 3, "event_spike_detect",
+ 4, "event_freq_mode",
+ 5, "event_clock_sync",
+ 6, "event_restart",
+ 7, "event_panic_stop",
+ 8, "event_no_sys_peer",
+ 9, "event_leap_armed",
+ 10, "event_leap_disarmed",
+ 11, "event_leap_event",
+ 12, "event_clock_step",
+ 13, "event_kern",
+ 14, "event_loaded_leaps",
+ 15, "event_stale_leaps",
"-", "event",
);
sub LI
@@ -196,26 +206,38 @@ sub psw_PStat_config { return ($_[$[] & 0x8000) == 0x8000; }
sub psw_PStat_authenable { return ($_[$[] & 0x4000) == 0x4000; }
sub psw_PStat_authentic { return ($_[$[] & 0x2000) == 0x2000; }
sub psw_PStat_reach { return ($_[$[] & 0x1000) == 0x1000; }
-sub psw_PStat_sane { return ($_[$[] & 0x0800) == 0x0800; }
-sub psw_PStat_dispok { return ($_[$[] & 0x0400) == 0x0400; }
+sub psw_PStat_bcast { return ($_[$[] & 0x0800) == 0x0800; }
sub psw_PStat { return ($_[$[] >> 10) & 0x3f; }
sub psw_PSel { return ($_[$[] >> 8) & 0x3; }
sub psw_PCnt { return ($_[$[] >> 4) & 0xf; }
sub psw_PCode { return $_[$[] & 0xf; }
%PeerSelection = (0, "sel_reject",
- 1, "sel_candidate",
- 2, "sel_selcand",
- 3, "sel_sys.peer",
+ 1, "sel_falsetick",
+ 2, "sel_excess",
+ 3, "sel_outlier",
+ 4, "sel_candidate",
+ 5, "sel_backup",
+ 6, "sel_sys.peer",
+ 6, "sel_pps.peer",
"-", "PeerSel",
);
%PeerEvent = (0, "event_unspec",
- 1, "event_ip_err",
- 2, "event_authen",
+ 1, "event_mobilize",
+ 2, "event_demobilize",
3, "event_unreach",
4, "event_reach",
- 5, "event_clock_excptn",
- 6, "event_stratum_chg",
+ 5, "event_restart",
+ 6, "event_no_reply",
+ 7, "event_rate_exceed",
+ 8, "event_denied",
+ 9, "event_leap_armed",
+ 10, "event_sys_peer",
+ 11, "event_clock_event",
+ 12, "event_bad_auth",
+ 13, "event_popcorn",
+ 14, "event_intlv_mode",
+ 15, "event_intlv_err",
"-", "event",
);
@@ -236,8 +258,7 @@ sub peer_status
$x .= "authenable," if &psw_PStat_authenable($_[$[]);
$x .= "authentic," if &psw_PStat_authentic($_[$[]);
$x .= "reach," if &psw_PStat_reach($_[$[]);
- $x .= &psw_PStat_sane($_[$[]) ? "sane," : "insane,";
- $x .= "hi_disp," unless &psw_PStat_dispok($_[$[]);
+ $x .= "bcast," if &psw_PStat_bcast($_[$[]);
$x .= sprintf(" %s, %d event%s, %s", &PeerSelection($_[$[]),
&psw_PCnt($_[$[]), ((&psw_PCnt($_[$[]) == 1) ? "" : "s"),
@@ -256,7 +277,7 @@ sub csw_CEvnt { return $_[$[] & 0xff; }
1, "clk_timeout",
2, "clk_badreply",
3, "clk_fault",
- 4, "clk_prop",
+ 4, "clk_badsig",
5, "clk_baddate",
6, "clk_badtime",
"-", "clk",
@@ -295,13 +316,19 @@ sub error_status
;#
;# cntrl op name translation
-%CntrlOpName = (1, "read_status",
+%CntrlOpName = (0, "reserved",
+ 1, "read_status",
2, "read_variables",
3, "write_variables",
4, "read_clock_variables",
5, "write_clock_variables",
6, "set_trap",
7, "trap_response",
+ 8, "configure",
+ 9, "saveconf",
+ 10, "read_mru",
+ 11, "read_ordlist",
+ 12, "rqst_nonce",
31, "unset_trap", # !!! unofficial !!!
"-", "cntrlop",
);
@@ -393,7 +420,7 @@ sub handle_packet
$STAT_frag++;
$lastseen = 1 if !&pkt_M($r_e_m_op);
- if (!defined(%FRAGS))
+ if (!%FRAGS)
{
print((&pkt_M($r_e_m_op) ? " more" : "")."\n");
$FRAGS{$offset} = $data;
diff --git a/scripts/monitoring/ntptrap b/scripts/monitoring/ntptrap
index 5a1bcb1b225e..f2abef950872 100644
--- a/scripts/monitoring/ntptrap
+++ b/scripts/monitoring/ntptrap
@@ -45,15 +45,17 @@ $ntp'timeout if 0;
;#
sub usage
{
- die("usage: $0 [-n] [-p <port>] [-l <logfile>] [host] ...\n");
+ die("usage: $0 [-p <port>] [-l <logfile>] [host] ...\n");
}
-$opt_l = "/dev/null"; # where to write debug messages to
-$opt_p = 0; # port to use locally - (0 does mean: will be choosen by kernel)
-
&usage unless &Getopts('l:p:');
&Getopts if 0; # make -w happy
+$opt_l = "/dev/null" # where to write debug messages to
+ if (!$opt_l);
+$opt_p = 0 # port to use locally - (0 does mean: will be chosen by kernel)
+ if (!$opt_p);
+
@Hosts = ($#ARGV < $[) ? ("localhost") : @ARGV;
;# setup for debug output
diff --git a/scripts/ntp-wait.in b/scripts/ntp-wait.in
deleted file mode 100644
index 7b026ca1909c..000000000000
--- a/scripts/ntp-wait.in
+++ /dev/null
@@ -1,54 +0,0 @@
-#! @PATH_PERL@ -w
-
-die "perl5 needed\n" unless ($] > 5);
-
-use Getopt::Std;
-
-$opt_n = 1000; # How many tries before we give up? (10 min+)
-$opt_s = 6; # Seconds to sleep between tries (6s = 10/min)
-$opt_v = 0; # Be verbose?
-
-getopts('n:s:v');
-
-$cmd = 'ntpq -c "rv 0"';
-
-$| = 1; # Autoflush output.
-
-print "Waiting for ntpd to synchronize... " if ($opt_v);
-for ($i = 0; $i < $opt_n; ++$i) {
- open(Q, $cmd." 2>&1 |") || die "Can't start ntpq: $!";
- while(<Q>) {
- chomp;
- # the first line should be similar to:
- # associd=0 status=0645 leap_none, sync_ntp, ...
- if (/^associd=0 status=(\S{4}) (\S+), (\S+),/) {
- my $status = $1;
- my $leap = $2;
- my $sync = $3;
- # print $_;
- # print "status <$status>, leap <$leap>, sync <$sync>\n";
- last if ($leap =~ /(sync|leap)_alarm/);
- if ($leap =~ /leap_(none|((add|del)_sec))/) {
- # We could check $sync here to make sure we like the source...
- print "\bOK!\n" if ($opt_v);
- exit 0;
- }
- print "\bUnexpected 'leap' status <$leap>\n";
- exit 1;
- }
-
- if (/Connection refused/) {
- print "\bntpd is not running!\n" if ($opt_v);
- exit 1;
- }
-
- # Otherwise, we have a bigger problem.
- print "\bUnexpected first line <$_>\n";
- exit 1;
- }
- close(Q);
- print "\b".substr("*+:.", $i % 4, 1) if ($opt_v);
- sleep($opt_s);
-}
-print "\bNo!\nntpd did not synchronize.\n" if ($opt_v);
-exit 1;
diff --git a/scripts/ntp-wait/Makefile.am b/scripts/ntp-wait/Makefile.am
new file mode 100644
index 000000000000..b819329ead9e
--- /dev/null
+++ b/scripts/ntp-wait/Makefile.am
@@ -0,0 +1,96 @@
+NULL=
+
+bin_SCRIPTS = $(NTP_WAIT_DB)
+libexec_SCRIPTS = $(NTP_WAIT_DL)
+sbin_SCRIPTS = $(NTP_WAIT_DS)
+
+man1_MANS=
+man8_MANS=
+man_MANS= ntp-wait.$(NTP_WAIT_MS)
+
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+EXTRA_SCRIPTS = ntp-wait
+
+DISTCLEANFILES = config.log $(man_MANS)
+EXTRA_DIST = \
+ ntp-wait.in \
+ ntp-wait.1ntp-waitman \
+ ntp-wait.1ntp-waitmdoc \
+ ntp-wait.man.in \
+ ntp-wait.mdoc.in \
+ ntp-wait.texi \
+ ntp-wait.html \
+ ntp-wait-opts.def \
+ ntp-wait-opts \
+ invoke-ntp-wait.texi \
+ invoke-ntp-wait.menu \
+ $(NULL)
+
+html_DATA = $(srcdir)/ntp-wait.html
+
+noinst_DATA = \
+ ntp-wait.1ntp-waitman \
+ ntp-wait.1ntp-waitmdoc \
+ ntp-wait.man.in \
+ ntp-wait.mdoc.in \
+ ntp-wait.texi \
+ ntp-wait.html \
+ ntp-wait-opts.def \
+ ntp-wait-opts \
+ invoke-ntp-wait.texi \
+ invoke-ntp-wait.menu \
+ $(NULL)
+
+ntp-wait: $(srcdir)/ntp-wait-opts
+
+$(srcdir)/ntp-wait-opts: $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) ntp-wait-opts.def
+
+### Nroff
+
+$(srcdir)/ntp-wait.1ntp-waitman: $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntp-waitman -Tagman-cmd.tpl ntp-wait-opts.def
+
+$(srcdir)/ntp-wait.man.in: $(srcdir)/ntp-wait.1ntp-waitman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitman > $(srcdir)/ntp-wait.man.in+
+ mv $(srcdir)/ntp-wait.man.in+ $(srcdir)/ntp-wait.man.in
+
+### Mdoc
+
+$(srcdir)/ntp-wait.1ntp-waitmdoc: $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntp-waitmdoc -Tagmdoc-cmd.tpl ntp-wait-opts.def
+
+$(srcdir)/ntp-wait.mdoc.in: $(srcdir)/ntp-wait.1ntp-waitmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitmdoc > $(srcdir)/ntp-wait.mdoc.in+
+ mv $(srcdir)/ntp-wait.mdoc.in+ $(srcdir)/ntp-wait.mdoc.in
+
+### Manpage
+
+ntp-wait.$(NTP_WAIT_MS): $(srcdir)/ntp-wait.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntp-wait.$(NTP_WAIT_MS)+:$(srcdir)/ntp-wait.$(MANTAGFMT).in
+ mv ntp-wait.$(NTP_WAIT_MS)+ ntp-wait.$(NTP_WAIT_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-ntp-wait.menu: $(srcdir)/invoke-ntp-wait.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntp-wait.texi: ntp-wait-opts $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-wait-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/ntp-wait.html: $(srcdir)/invoke-ntp-wait.menu $(srcdir)/invoke-ntp-wait.texi $(srcdir)/ntp-wait.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntp-wait.html ntp-wait.texi || true )
diff --git a/scripts/ntp-wait/Makefile.in b/scripts/ntp-wait/Makefile.in
new file mode 100644
index 000000000000..8357c52122ba
--- /dev/null
+++ b/scripts/ntp-wait/Makefile.in
@@ -0,0 +1,880 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = scripts/ntp-wait
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/ntp-wait.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = ntp-wait
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) $(sbin_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
+MAKE_LIBPARSE = @MAKE_LIBPARSE@
+MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
+MAKE_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+bin_SCRIPTS = $(NTP_WAIT_DB)
+libexec_SCRIPTS = $(NTP_WAIT_DL)
+sbin_SCRIPTS = $(NTP_WAIT_DS)
+man1_MANS =
+man8_MANS =
+man_MANS = ntp-wait.$(NTP_WAIT_MS)
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+EXTRA_SCRIPTS = ntp-wait
+DISTCLEANFILES = config.log $(man_MANS)
+EXTRA_DIST = \
+ ntp-wait.in \
+ ntp-wait.1ntp-waitman \
+ ntp-wait.1ntp-waitmdoc \
+ ntp-wait.man.in \
+ ntp-wait.mdoc.in \
+ ntp-wait.texi \
+ ntp-wait.html \
+ ntp-wait-opts.def \
+ ntp-wait-opts \
+ invoke-ntp-wait.texi \
+ invoke-ntp-wait.menu \
+ $(NULL)
+
+html_DATA = $(srcdir)/ntp-wait.html
+noinst_DATA = \
+ ntp-wait.1ntp-waitman \
+ ntp-wait.1ntp-waitmdoc \
+ ntp-wait.man.in \
+ ntp-wait.mdoc.in \
+ ntp-wait.texi \
+ ntp-wait.html \
+ ntp-wait-opts.def \
+ ntp-wait-opts \
+ invoke-ntp-wait.texi \
+ invoke-ntp-wait.menu \
+ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/ntp-wait/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/ntp-wait/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+ntp-wait: $(top_builddir)/config.status $(srcdir)/ntp-wait.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-htmlDATA install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS install-libexecSCRIPTS \
+ install-sbinSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-htmlDATA \
+ uninstall-libexecSCRIPTS uninstall-man uninstall-sbinSCRIPTS
+
+uninstall-man: uninstall-man1 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binSCRIPTS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-htmlDATA install-info install-info-am \
+ install-libexecSCRIPTS install-man install-man1 install-man8 \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinSCRIPTS install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
+ uninstall-htmlDATA uninstall-libexecSCRIPTS uninstall-man \
+ uninstall-man1 uninstall-man8 uninstall-sbinSCRIPTS
+
+
+ntp-wait: $(srcdir)/ntp-wait-opts
+
+$(srcdir)/ntp-wait-opts: $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) ntp-wait-opts.def
+
+### Nroff
+
+$(srcdir)/ntp-wait.1ntp-waitman: $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntp-waitman -Tagman-cmd.tpl ntp-wait-opts.def
+
+$(srcdir)/ntp-wait.man.in: $(srcdir)/ntp-wait.1ntp-waitman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitman > $(srcdir)/ntp-wait.man.in+
+ mv $(srcdir)/ntp-wait.man.in+ $(srcdir)/ntp-wait.man.in
+
+### Mdoc
+
+$(srcdir)/ntp-wait.1ntp-waitmdoc: $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntp-waitmdoc -Tagmdoc-cmd.tpl ntp-wait-opts.def
+
+$(srcdir)/ntp-wait.mdoc.in: $(srcdir)/ntp-wait.1ntp-waitmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitmdoc > $(srcdir)/ntp-wait.mdoc.in+
+ mv $(srcdir)/ntp-wait.mdoc.in+ $(srcdir)/ntp-wait.mdoc.in
+
+### Manpage
+
+ntp-wait.$(NTP_WAIT_MS): $(srcdir)/ntp-wait.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntp-wait.$(NTP_WAIT_MS)+:$(srcdir)/ntp-wait.$(MANTAGFMT).in
+ mv ntp-wait.$(NTP_WAIT_MS)+ ntp-wait.$(NTP_WAIT_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-ntp-wait.menu: $(srcdir)/invoke-ntp-wait.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntp-wait.texi: ntp-wait-opts $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-wait-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/ntp-wait.html: $(srcdir)/invoke-ntp-wait.menu $(srcdir)/invoke-ntp-wait.texi $(srcdir)/ntp-wait.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntp-wait.html ntp-wait.texi || true )
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/scripts/ntp-wait/invoke-ntp-wait.menu b/scripts/ntp-wait/invoke-ntp-wait.menu
new file mode 100644
index 000000000000..bb51936efaa2
--- /dev/null
+++ b/scripts/ntp-wait/invoke-ntp-wait.menu
@@ -0,0 +1 @@
+* ntp-wait Invocation:: Invoking ntp-wait
diff --git a/scripts/ntp-wait/invoke-ntp-wait.texi b/scripts/ntp-wait/invoke-ntp-wait.texi
new file mode 100644
index 000000000000..2f660b5ebf4a
--- /dev/null
+++ b/scripts/ntp-wait/invoke-ntp-wait.texi
@@ -0,0 +1,114 @@
+@node ntp-wait Invocation
+@section Invoking ntp-wait
+@pindex ntp-wait
+@cindex Wait for ntpd to stabilize the system clock
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-ntp-wait.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:44:48 AM by AutoGen 5.18.5pre4
+# From the definitions ntp-wait-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+
+
+@code{ntp-wait}
+will send at most
+@kbd{num-tries}
+queries to
+@code{ntpd(8)},
+sleeping for
+@kbd{secs-between-tries}
+after each status return that says
+@code{ntpd(8)}
+has not yet produced a synchronized and stable system clock.
+
+@code{ntp-wait}
+will do this quietly, unless the
+@code{-v}
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+@kbd{ntpd} @kbd{-g}
+has set the time.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{ntp-wait} program.
+
+@menu
+* ntp-wait usage:: ntp-wait help/usage (@option{--help})
+* ntp-wait tries:: tries option (-n)
+* ntp-wait sleep:: sleep option (-s)
+* ntp-wait verbose:: verbose option (-v)
+* ntp-wait exit status:: exit status
+* ntp-wait Authors:: Authors
+* ntp-wait Notes:: Notes
+@end menu
+
+@node ntp-wait usage
+@subsection ntp-wait help/usage (@option{--help})
+@cindex ntp-wait help
+
+This is the automatically generated usage text for ntp-wait.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8
+USAGE: ntp-wait [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
+
+ -n, --tries=num Number of times to check ntpd
+ -s, --sleep=num How long to sleep between tries
+ -v, --verbose Be verbose
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+@end example
+@exampleindent 4
+
+@node ntp-wait tries
+@subsection tries option (-n)
+@cindex ntp-wait-tries
+
+This is the ``number of times to check ntpd'' option.
+This option takes a number argument.
+ The maximum number of times we will check @code{ntpd} to see if
+ it has been able to synchronize and stabilize the system clock.
+@node ntp-wait sleep
+@subsection sleep option (-s)
+@cindex ntp-wait-sleep
+
+This is the ``how long to sleep between tries'' option.
+This option takes a number argument @file{secs-between-tries}.
+ We will sleep for @file{secs-between-tries} after each query
+ of @code{ntpd} that returns "the time is not yet stable".
+@node ntp-wait verbose
+@subsection verbose option (-v)
+@cindex ntp-wait-verbose
+
+This is the ``be verbose'' option.
+ By default, @code{ntp-wait} is silent.
+ With this option, @code{ntp-wait} will provide status information.
+@node ntp-wait exit status
+@subsection ntp-wait exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
+@node ntp-wait Authors
+@subsection ntp-wait Authors
+@node ntp-wait Notes
+@subsection ntp-wait Notes
diff --git a/scripts/ntp-wait/ntp-wait-opts b/scripts/ntp-wait/ntp-wait-opts
new file mode 100644
index 000000000000..3184f7b3e79d
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait-opts
@@ -0,0 +1,62 @@
+# EDIT THIS FILE WITH CAUTION (ntp-wait-opts)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:44:43 AM by AutoGen 5.18.5pre4
+# From the definitions ntp-wait-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'tries' => '100',
+ 'sleep' => '6',
+ 'verbose' => '',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'tries|n=i', 'sleep|s=i', 'verbose|v',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8
+USAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
+
+ -n, --tries=num Number of times to check ntpd
+ -s, --sleep=num How long to sleep between tries
+ -v, --verbose Be verbose
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/ntp-wait/ntp-wait-opts.def b/scripts/ntp-wait/ntp-wait-opts.def
new file mode 100644
index 000000000000..14eebbc91c30
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait-opts.def
@@ -0,0 +1,109 @@
+/* -*- Mode: Text -*- */
+AutoGen Definitions perlopt;
+
+#include autogen-version.def
+
+prog-name = "ntp-wait";
+prog-title = "Wait for ntpd to stabilize the system clock";
+package = ntp;
+#include version.def
+
+long-opts;
+gnu-usage;
+
+flag = {
+ name = tries;
+ value = n;
+ arg-type = number;
+ arg-default = 100;
+ descrip = "Number of times to check ntpd";
+ doc = <<- _EndOfDoc_
+ The maximum number of times we will check @code{ntpd} to see if
+ it has been able to synchronize and stabilize the system clock.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = sleep;
+ value = s;
+ arg-type = number;
+ arg-name = "secs-between-tries";
+ arg-default = 6;
+ descrip = "How long to sleep between tries";
+ doc = <<- _EndOfDoc_
+ We will sleep for @file{secs-between-tries} after each query
+ of @code{ntpd} that returns "the time is not yet stable".
+ _EndOfDoc_;
+};
+
+flag = {
+ name = verbose;
+ value = v;
+ descrip = "Be verbose";
+ doc = <<- _EndOfDoc_
+ By default, @code{ntp-wait} is silent.
+ With this option, @code{ntp-wait} will provide status information.
+ _EndOfDoc_;
+};
+
+explain = <<- _END_EXPLAIN
+ _END_EXPLAIN;
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+.Nm
+will send at most
+.Ar num-tries
+queries to
+.Xr ntpd 8 ,
+sleeping for
+.Ar secs-between-tries
+after each status return that says
+.Xr ntpd 8
+has not yet produced a synchronized and stable system clock.
+.Pp
+.Nm
+will do this quietly, unless the
+.Fl v
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+.Ar ntpd -g
+has set the time.
+ _END_PROG_MDOC_DESCRIP;
+};
+
+/*
+doc-section = {
+ ds-type = 'USAGE';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_USAGE
+ _END_MDOC_USAGE;
+};
+*/
+
+doc-section = {
+ ds-type = 'AUTHORS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_AUTH
+.An "Harlan Stenn"
+ _END_MDOC_AUTH;
+};
+
+doc-section = {
+ ds-type = 'NOTES';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_NOTES
+This document corresponds to version @VERSION@ of NTP.
+ _END_MDOC_NOTES;
+};
+
+/*
+doc-section = {
+ ds-type = 'BUGS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_BUGS
+ _END_MDOC_BUGS;
+};
+*/
diff --git a/scripts/ntp-wait/ntp-wait.1ntp-waitman b/scripts/ntp-wait/ntp-wait.1ntp-waitman
new file mode 100644
index 000000000000..b30efe1d535c
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.1ntp-waitman
@@ -0,0 +1,122 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntp-wait 1ntp-waitman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-JTaWc1/ag-WTa4b1)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:45 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp-wait-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntp-wait\fP
+\- Wait for ntpd to stabilize the system clock
+.SH SYNOPSIS
+\f\*[B-Font]ntp-wait\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]ntp-wait\fP
+will send at most
+\f\*[I-Font]num-tries\f[]
+queries to
+\fCntpd\fR(8)\f[],
+sleeping for
+\f\*[I-Font]secs-between-tries\f[]
+after each status return that says
+\fCntpd\fR(8)\f[]
+has not yet produced a synchronized and stable system clock.
+.sp \n(Ppu
+.ne 2
+
+\f\*[B-Font]ntp-wait\fP
+will do this quietly, unless the
+\f\*[B-Font]\-v\f[]
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+\f\*[I-Font]ntpd\f[] \f\*[I-Font]\-g\f[]
+has set the time.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-n\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-tries\f[]=\f\*[I-Font]number\f[]
+Number of times to check ntpd.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]number\f[]
+for this option is:
+.ti +4
+ 100
+.sp
+ The maximum number of times we will check \fBntpd\fP to see if
+ it has been able to synchronize and stabilize the system clock.
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]secs\-between\-tries\f[], \f\*[B-Font]\-\-sleep\f[]=\f\*[I-Font]secs\-between\-tries\f[]
+How long to sleep between tries.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]secs\-between\-tries\f[]
+for this option is:
+.ti +4
+ 6
+.sp
+ We will sleep for \fIsecs-between-tries\fP after each query
+ of \fBntpd\fP that returns "the time is not yet stable".
+.TP
+.NOP \f\*[B-Font]\-v\f[], \f\*[B-Font]\-\-verbose\f[]
+Be verbose.
+.sp
+ By default, \fBntp-wait\fP is silent.
+ With this option, \fBntp-wait\fP will provide status information.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH AUTHORS
+.NOP "Harlan Stenn"
+.br
+.SH NOTES
+This document corresponds to version @VERSION@ of NTP.
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntp-wait\fP
+option definitions.
diff --git a/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc b/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
new file mode 100644
index 000000000000..14e26d710f46
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
@@ -0,0 +1,95 @@
+.Dd December 19 2014
+.Dt NTP_WAIT 1ntp-waitmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:51 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp-wait-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntp-wait
+.Nd Wait for ntpd to stabilize the system clock
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.Nm
+will send at most
+.Ar num\-tries
+queries to
+.Xr ntpd 8 ,
+sleeping for
+.Ar secs\-between\-tries
+after each status return that says
+.Xr ntpd 8
+has not yet produced a synchronized and stable system clock.
+.Pp
+.Nm
+will do this quietly, unless the
+.Fl v
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+.Ar ntpd \-g
+has set the time.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl n Ar number , Fl \-tries Ns = Ns Ar number
+Number of times to check ntpd.
+This option takes an integer number as its argument.
+The default
+.Ar number
+for this option is:
+.ti +4
+ 100
+.sp
+ The maximum number of times we will check \fBntpd\fP to see if
+ it has been able to synchronize and stabilize the system clock.
+.It Fl s Ar secs\-between\-tries , Fl \-sleep Ns = Ns Ar secs\-between\-tries
+How long to sleep between tries.
+This option takes an integer number as its argument.
+The default
+.Ar secs\-between\-tries
+for this option is:
+.ti +4
+ 6
+.sp
+ We will sleep for \fIsecs\-between\-tries\fP after each query
+ of \fBntpd\fP that returns "the time is not yet stable".
+.It Fl v , Fl \-verbose
+Be verbose.
+.sp
+ By default, \fBntp\-wait\fP is silent.
+ With this option, \fBntp\-wait\fP will provide status information.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh AUTHORS
+.An "Harlan Stenn"
+.Sh NOTES
+This document corresponds to version @VERSION@ of NTP.
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntp\-wait\fP
+option definitions.
diff --git a/scripts/ntp-wait/ntp-wait.html b/scripts/ntp-wait/ntp-wait.html
new file mode 100644
index 000000000000..5ac2849df0b5
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.html
@@ -0,0 +1,208 @@
+<html lang="en">
+<head>
+<title>Ntp-wait User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="Ntp-wait User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">Ntp-wait User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-Description">ntp-wait Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+ <p>This document describes the use of the NTP Project's <code>ntp-wait</code> program.
+
+ <p>If there are time-sensitive applications,
+the proper sequence of events is to
+run <code>ntpd -g</code> as early as possible,
+then invoke all of the non-time-sensitive process,
+run <code>ntp-wait</code> to block
+until the system's time has stabilized and synchronized,
+and only then start any applicaitons (like database servers) that require
+accurate and stable time.
+
+ <p>This document applies to version 4.2.8 of <code>ntp-wait</code>.
+
+<div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntp_002dwait-Description">ntp-wait Description</a>: Description
+<li><a accesskey="2" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>: Invoking ntp-wait
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002dwait-Invocation"></a>
+<br>
+</div>
+
+<h3 class="section">0.1 Invoking ntp-wait</h3>
+
+<p><a name="index-ntp_002dwait-1"></a><a name="index-Wait-for-ntpd-to-stabilize-the-system-clock-2"></a>
+
+ <p><code>ntp-wait</code>
+will send at most
+<kbd>num-tries</kbd>
+queries to
+<code>ntpd(8)</code>,
+sleeping for
+<kbd>secs-between-tries</kbd>
+after each status return that says
+<code>ntpd(8)</code>
+has not yet produced a synchronized and stable system clock.
+
+ <p><code>ntp-wait</code>
+will do this quietly, unless the
+<code>-v</code>
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+<kbd>ntpd</kbd> <kbd>-g</kbd>
+has set the time.
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp-wait</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntp_002dwait-usage">ntp-wait usage</a>: ntp-wait help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#ntp_002dwait-tries">ntp-wait tries</a>: tries option (-n)
+<li><a accesskey="3" href="#ntp_002dwait-sleep">ntp-wait sleep</a>: sleep option (-s)
+<li><a accesskey="4" href="#ntp_002dwait-verbose">ntp-wait verbose</a>: verbose option (-v)
+<li><a accesskey="5" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>: exit status
+<li><a accesskey="6" href="#ntp_002dwait-Authors">ntp-wait Authors</a>: Authors
+<li><a accesskey="7" href="#ntp_002dwait-Notes">ntp-wait Notes</a>: Notes
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002dwait-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-tries">ntp-wait tries</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.1 ntp-wait help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-ntp_002dwait-help-3"></a>
+This is the automatically generated usage text for ntp-wait.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8
+USAGE: ntp-wait [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
+
+ -n, --tries=num Number of times to check ntpd
+ -s, --sleep=num How long to sleep between tries
+ -v, --verbose Be verbose
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+</pre>
+ <div class="node">
+<p><hr>
+<a name="ntp_002dwait-tries"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-sleep">ntp-wait sleep</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-usage">ntp-wait usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.2 tries option (-n)</h4>
+
+<p><a name="index-ntp_002dwait_002dtries-4"></a>
+This is the &ldquo;number of times to check ntpd&rdquo; option.
+This option takes a number argument.
+ The maximum number of times we will check <code>ntpd</code> to see if
+ it has been able to synchronize and stabilize the system clock.
+<div class="node">
+<p><hr>
+<a name="ntp_002dwait-sleep"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-verbose">ntp-wait verbose</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-tries">ntp-wait tries</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.3 sleep option (-s)</h4>
+
+<p><a name="index-ntp_002dwait_002dsleep-5"></a>
+This is the &ldquo;how long to sleep between tries&rdquo; option.
+This option takes a number argument <span class="file">secs-between-tries</span>.
+ We will sleep for <span class="file">secs-between-tries</span> after each query
+ of <code>ntpd</code> that returns "the time is not yet stable".
+<div class="node">
+<p><hr>
+<a name="ntp_002dwait-verbose"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-sleep">ntp-wait sleep</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.4 verbose option (-v)</h4>
+
+<p><a name="index-ntp_002dwait_002dverbose-6"></a>
+This is the &ldquo;be verbose&rdquo; option.
+ By default, <code>ntp-wait</code> is silent.
+ With this option, <code>ntp-wait</code> will provide status information.
+<div class="node">
+<p><hr>
+<a name="ntp_002dwait-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-Authors">ntp-wait Authors</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-verbose">ntp-wait verbose</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.5 ntp-wait exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+ <div class="node">
+<p><hr>
+<a name="ntp_002dwait-Authors"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-Notes">ntp-wait Notes</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.6 ntp-wait Authors</h4>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002dwait-Notes"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-Authors">ntp-wait Authors</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.7 ntp-wait Notes</h4>
+
+</body></html>
+
diff --git a/scripts/ntp-wait/ntp-wait.in b/scripts/ntp-wait/ntp-wait.in
new file mode 100644
index 000000000000..b35828a16582
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.in
@@ -0,0 +1,66 @@
+#! @PATH_PERL@
+
+package ntp_wait;
+use 5.006_000;
+use strict;
+use warnings;
+use lib "@PERLLIBDIR@";
+use NTP::Util qw(ntp_read_vars);
+
+exit run(@ARGV) unless caller;
+
+sub run {
+ my $opts;
+ if (!processOptions(\@_, $opts)) {
+ usage(1);
+ };
+
+ my $tries = $opts->{tries}; # How many tries before we give up? (10 min+)
+ my $sleep = $opts->{sleep}; # Seconds to sleep between tries (6s = 10/min)
+ my $verbose = $opts->{verbose}; # Be verbose?
+
+ # Autoflush stdout
+ $| = 1;
+
+ print "Waiting for ntpd to synchronize... " if $verbose;
+
+ for my $i (1 .. $tries) {
+ my $info = ntp_read_vars(0, []);
+
+ if (!defined $info) {
+ print "\bntpd is not running!\n" if $verbose;
+ return 1;
+ }
+
+ if (!exists $info->{status_line}{leap}) {
+ print "\bLeap status not avalaible\n";
+ return 1;
+ }
+
+ my $leap = $info->{status_line}{leap};
+ my $sync = $info->{status_line}{sync};
+
+ if ($leap =~ /(sync|leap)_alarm/) {
+ print "\b".(substr "*+:.", $i % 4, 1) if $verbose;
+ sleep $sleep if $i < $tries;
+ next;
+ }
+
+ if ($leap =~ /leap_(none|((add|del)_sec))/) {
+ # We could check $sync here to make sure we like the source...
+ print "\bOK!\n" if $verbose;
+ return 0;
+ }
+
+ print "\bUnexpected 'leap' status <$leap>\n";
+ return 1;
+ }
+
+ print "\bNo!\nntpd did not synchronize.\n" if $verbose;
+ return 1;
+}
+
+@ntp_wait_opts@
+
+1;
+__END__
diff --git a/scripts/ntp-wait/ntp-wait.man.in b/scripts/ntp-wait/ntp-wait.man.in
new file mode 100644
index 000000000000..dbcfd24f7870
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.man.in
@@ -0,0 +1,122 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntp-wait @NTP_WAIT_MS@ "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-JTaWc1/ag-WTa4b1)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:45 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp-wait-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntp-wait\fP
+\- Wait for ntpd to stabilize the system clock
+.SH SYNOPSIS
+\f\*[B-Font]ntp-wait\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]ntp-wait\fP
+will send at most
+\f\*[I-Font]num-tries\f[]
+queries to
+\fCntpd\fR(8)\f[],
+sleeping for
+\f\*[I-Font]secs-between-tries\f[]
+after each status return that says
+\fCntpd\fR(8)\f[]
+has not yet produced a synchronized and stable system clock.
+.sp \n(Ppu
+.ne 2
+
+\f\*[B-Font]ntp-wait\fP
+will do this quietly, unless the
+\f\*[B-Font]\-v\f[]
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+\f\*[I-Font]ntpd\f[] \f\*[I-Font]\-g\f[]
+has set the time.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-n\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-tries\f[]=\f\*[I-Font]number\f[]
+Number of times to check ntpd.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]number\f[]
+for this option is:
+.ti +4
+ 100
+.sp
+ The maximum number of times we will check \fBntpd\fP to see if
+ it has been able to synchronize and stabilize the system clock.
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]secs\-between\-tries\f[], \f\*[B-Font]\-\-sleep\f[]=\f\*[I-Font]secs\-between\-tries\f[]
+How long to sleep between tries.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]secs\-between\-tries\f[]
+for this option is:
+.ti +4
+ 6
+.sp
+ We will sleep for \fIsecs-between-tries\fP after each query
+ of \fBntpd\fP that returns "the time is not yet stable".
+.TP
+.NOP \f\*[B-Font]\-v\f[], \f\*[B-Font]\-\-verbose\f[]
+Be verbose.
+.sp
+ By default, \fBntp-wait\fP is silent.
+ With this option, \fBntp-wait\fP will provide status information.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH AUTHORS
+.NOP "Harlan Stenn"
+.br
+.SH NOTES
+This document corresponds to version @VERSION@ of NTP.
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntp-wait\fP
+option definitions.
diff --git a/scripts/ntp-wait/ntp-wait.mdoc.in b/scripts/ntp-wait/ntp-wait.mdoc.in
new file mode 100644
index 000000000000..7d73e4ebd90e
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.mdoc.in
@@ -0,0 +1,95 @@
+.Dd December 19 2014
+.Dt NTP_WAIT @NTP_WAIT_MS@ User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:51 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp-wait-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntp-wait
+.Nd Wait for ntpd to stabilize the system clock
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.Nm
+will send at most
+.Ar num\-tries
+queries to
+.Xr ntpd 8 ,
+sleeping for
+.Ar secs\-between\-tries
+after each status return that says
+.Xr ntpd 8
+has not yet produced a synchronized and stable system clock.
+.Pp
+.Nm
+will do this quietly, unless the
+.Fl v
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+.Ar ntpd \-g
+has set the time.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl n Ar number , Fl \-tries Ns = Ns Ar number
+Number of times to check ntpd.
+This option takes an integer number as its argument.
+The default
+.Ar number
+for this option is:
+.ti +4
+ 100
+.sp
+ The maximum number of times we will check \fBntpd\fP to see if
+ it has been able to synchronize and stabilize the system clock.
+.It Fl s Ar secs\-between\-tries , Fl \-sleep Ns = Ns Ar secs\-between\-tries
+How long to sleep between tries.
+This option takes an integer number as its argument.
+The default
+.Ar secs\-between\-tries
+for this option is:
+.ti +4
+ 6
+.sp
+ We will sleep for \fIsecs\-between\-tries\fP after each query
+ of \fBntpd\fP that returns "the time is not yet stable".
+.It Fl v , Fl \-verbose
+Be verbose.
+.sp
+ By default, \fBntp\-wait\fP is silent.
+ With this option, \fBntp\-wait\fP will provide status information.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh AUTHORS
+.An "Harlan Stenn"
+.Sh NOTES
+This document corresponds to version @VERSION@ of NTP.
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntp\-wait\fP
+option definitions.
diff --git a/scripts/ntp-wait/ntp-wait.texi b/scripts/ntp-wait/ntp-wait.texi
new file mode 100644
index 000000000000..208639b3dff9
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.texi
@@ -0,0 +1,52 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename ntp-wait.info
+@settitle Ntp-wait User's Manual
+@include ../../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{ntp-wait},
+a program from
+the NTP Project,
+that is used to wait until @code{ntpd} has been able to
+synchronize and stabilize the time on the current host.
+@end ifinfo
+
+@direntry
+* ntp-wait: (ntp-wait). Wait for ntpd to synchronize and stabilize the system clock.
+@end direntry
+
+@titlepage
+@title ntp-wait User's Manual
+@subtitle ntp-wait, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, ntp-wait Description, (dir), (dir)
+
+This document describes the use of the NTP Project's @code{ntp-wait} program.
+
+If there are time-sensitive applications,
+the proper sequence of events is to
+run @code{ntpd -g} as early as possible,
+then invoke all of the non-time-sensitive process,
+run @code{ntp-wait} to block
+until the system's time has stabilized and synchronized,
+and only then start any applicaitons (like database servers) that require
+accurate and stable time.
+
+This document applies to version @value{VERSION} of @code{ntp-wait}.
+
+@shortcontents
+
+@menu
+* ntp-wait Description:: Description
+* ntp-wait Invocation:: Invoking ntp-wait
+@end menu
+
+@include invoke-ntp-wait.texi
diff --git a/scripts/ntpsweep.in b/scripts/ntpsweep.in
deleted file mode 100644
index e503a0637a34..000000000000
--- a/scripts/ntpsweep.in
+++ /dev/null
@@ -1,300 +0,0 @@
-#! @PATH_PERL@ -w
-#
-# $Id$
-#
-# DISCLAIMER
-#
-# Copyright (C) 1999,2000 Hans Lambermont and Origin B.V.
-#
-# Permission to use, copy, modify and distribute this software and its
-# documentation for any purpose and without fee is hereby granted,
-# provided that the above copyright notice appears in all copies and
-# that both the copyright notice and this permission notice appear in
-# supporting documentation. This software is supported as is and without
-# any express or implied warranties, including, without limitation, the
-# implied warranties of merchantability and fitness for a particular
-# purpose. The name Origin B.V. must not be used to endorse or promote
-# products derived from this software without prior written permission.
-#
-# Hans Lambermont <ntpsweep@lambermont.dyndns.org>
-
-require 5.0; # But actually tested on 5.004 ;)
-use Getopt::Long; # GetOptions()
-use strict;
-
-my $version = 1.3;
-(my $program = $0) =~ s%.*/(.+?)(.pl)?$%$1%;
-
-# Hardcoded paths/program names
-my $ntpdate = "ntpdate";
-my $ntpq = "ntpq";
-
-# no STDOUT buffering
-$| = 1;
-
-my ($help, $single_host, $showpeers, $maxlevel, $strip, $askversion);
-my $res = GetOptions("help!" => \$help,
- "host=s" => \$single_host,
- "peers!" => \$showpeers,
- "maxlevel=s" => \$maxlevel,
- "strip=s" => \$strip,
- "version!" => \$askversion);
-
-if ($askversion) {
- print("$version\n");
- exit 0;
-}
-
-if ($help || ((@ARGV != 1) && !$single_host)) {
- warn <<EOF;
-This is $program, version $version
-Copyright (C) 1999,2000 Hans Lambermont and Origin B.V. Disclaimer inside.
-
-Usage:
- $program [--help|--peers|--strip <string>|--maxlevel <level>|--version] \\
- <file>|[--host <hostname>]
-
-Description:
- $program prints per host given in <file> the NTP stratum level, the
- clock offset in seconds, the daemon version, the operating system and
- the processor. Optionally recursing through all peers.
-
-Options:
---help
- Print this short help text and exit.
---version
- Print version ($version) and exit.
-<file>
- Specify hosts file. File format is one hostname or ip number per line.
- Lines beginning with # are considered as comment.
---host <hostname>
- Speficy a single host, bypassing the need for a hosts file.
---peers
- Recursively list all peers a host synchronizes to.
- An '= ' before a peer means a loop. Recursion stops here.
---maxlevel <level>
- Traverse peers up to this level (4 is a reasonable number).
---strip <string>
- Strip <string> from hostnames.
-
-Examples:
- $program myhosts.txt --strip .foo.com
- $program --host some.host --peers --maxlevel 4
-EOF
- exit 1;
-}
-
-my $hostsfile = shift;
-my (@hosts, @known_hosts);
-my (%known_host_info, %known_host_peers);
-
-sub read_hosts()
-{
- local *HOSTS;
- open (HOSTS, $hostsfile) ||
- die "$program: FATAL: unable to read $hostsfile: $!\n";
- while (<HOSTS>) {
- next if /^\s*(#|$)/; # comment/empty
- chomp;
- push(@hosts, $_);
- }
- close(HOSTS);
-}
-
-# translate IP to hostname if possible
-sub ip2name {
- my($ip) = @_;
- my($addr, $name, $aliases, $addrtype, $length, @addrs);
- $addr = pack('C4', split(/\./, $ip));
- ($name, $aliases, $addrtype, $length, @addrs) = gethostbyaddr($addr, 2);
- if ($name) {
- # return lower case name
- return("\L$name");
- } else {
- return($ip);
- }
-}
-
-# item_in_list($item, @list): returns 1 if $item is in @list, 0 if not
-sub item_in_list {
- my($item, @list) = @_;
- my($i);
- foreach $i (@list) {
- return 1 if ($item eq $i);
- }
- return 0;
-}
-
-sub scan_host($;$;$) {
- my($host, $level, @trace) = @_;
- my $stratum = 0;
- my $offset = 0;
- my $daemonversion = "";
- my $system = "";
- my $processor = "";
- my @peers;
- my $known_host = 0;
-
- if (&item_in_list($host, @known_hosts)) {
- $known_host = 1;
- } else {
- # ntpdate part
- open(NTPDATE, "$ntpdate -bd $host 2>/dev/null |") ||
- die "Cannot open ntpdate pipe: $!\n";
- while (<NTPDATE>) {
- /^stratum\s+(\d+).*$/ && do {
- $stratum = $1;
- };
- /^offset\s+([0-9.-]+)$/ && do {
- $offset = $1;
- };
- }
- close(NTPDATE);
-
- # got answers ? If so, go on.
- if ($stratum) {
- # ntpq part
- my $ntpqparams = "-c 'rv 0 processor,system,daemon_version'";
- open(NTPQ, "$ntpq $ntpqparams $host 2>/dev/null |") ||
- die "Cannot open ntpq pipe: $!\n";
- while (<NTPQ>) {
- /daemon_version="(.*)"/ && do {
- $daemonversion = $1;
- };
- /system="([^"]*)"/ && do {
- $system = $1;
- };
- /processor="([^"]*)"/ && do {
- $processor = $1;
- };
- }
- close(NTPQ);
-
- # Shorten daemon_version string.
- $daemonversion =~ s/(;|Mon|Tue|Wed|Thu|Fri|Sat|Sun).*$//;
- $daemonversion =~ s/version=//;
- $daemonversion =~ s/(x|)ntpd //;
- $daemonversion =~ s/(\(|\))//g;
- $daemonversion =~ s/beta/b/;
- $daemonversion =~ s/multicast/mc/;
-
- # Shorten system string
- $system =~ s/UNIX\///;
- $system =~ s/RELEASE/r/;
- $system =~ s/CURRENT/c/;
-
- # Shorten processor string
- $processor =~ s/unknown//;
- }
-
- # got answers ? If so, go on.
- if ($daemonversion) {
- # ntpq again, find out the peers this time
- if ($showpeers) {
- my $ntpqparams = "-pn";
- open(NTPQ, "$ntpq $ntpqparams $host 2>/dev/null |") ||
- die "Cannot open ntpq pipe: $!\n";
- while (<NTPQ>) {
- /^No association ID's returned$/ && do {
- last;
- };
- /^ remote/ && do {
- next;
- };
- /^==/ && do {
- next;
- };
- /^( |x|\.|-|\+|#|\*|o)([^ ]+)/ && do {
- push(@peers, ip2name($2));
- next;
- };
- print "ERROR: $_";
- }
- close(NTPQ);
- }
- }
-
- # Add scanned host to known_hosts array
- push(@known_hosts, $host);
- if ($stratum) {
- $known_host_info{$host} = sprintf("%2d %9.3f %-11s %-12s %s",
- $stratum, $offset, substr($daemonversion,0,11),
- substr($system,0,12), substr($processor,0,9));
- } else {
- # Stratum level 0 is consider invalid
- $known_host_info{$host} = sprintf(" ?");
- }
- $known_host_peers{$host} = [@peers];
- }
-
- if ($stratum || $known_host) { # Valid or known host
- my $printhost = ' ' x $level . $host;
- # Shorten host string
- if ($strip) {
- $printhost =~ s/$strip//;
- }
- # append number of peers in brackets if requested and valid
- if ($showpeers && ($known_host_info{$host} ne " ?")) {
- $printhost .= " (" . @{$known_host_peers{$host}} . ")";
- }
- # Finally print complete host line
- printf("%-32s %s\n",
- substr($printhost,0,32), $known_host_info{$host});
- if ($showpeers && (eval($maxlevel ? $level < $maxlevel : 1))) {
- my $peer;
- push(@trace, $host);
- # Loop through peers
- foreach $peer (@{$known_host_peers{$host}}) {
- if (&item_in_list($peer, @trace)) {
- # we've detected a loop !
- $printhost = ' ' x ($level + 1) . "= " . $peer;
- # Shorten host string
- if ($strip) {
- $printhost =~ s/$strip//;
- }
- printf("%-32s %s\n",
- substr($printhost,0,32));
- } else {
- if (substr($peer,0,3) ne "127") {
- &scan_host($peer, $level + 1, @trace);
- }
- }
- }
- }
- } else { # We did not get answers from this host
- my $printhost = ' ' x $level . $host;
- # Shorten host string
- if ($strip) {
- $printhost =~ s/$strip//;
- }
- printf("%-32s ?\n", substr($printhost,0,32));
- }
-}
-
-sub scan_hosts()
-{
- my $host;
- for $host (@hosts) {
- my @trace;
- push(@trace, $host);
- scan_host($host, 0, @trace);
- }
-}
-
-# Main program
-
-if ($single_host) {
- push(@hosts, $single_host);
-} else {
- &read_hosts($hostsfile);
-}
-
-# Print header
-print <<EOF;
-Host st offset(s) version system processor
---------------------------------+--+---------+-----------+------------+---------
-EOF
-
-&scan_hosts();
-
-exit 0;
diff --git a/scripts/ntpsweep/Makefile.am b/scripts/ntpsweep/Makefile.am
new file mode 100644
index 000000000000..7ecc23bd5abd
--- /dev/null
+++ b/scripts/ntpsweep/Makefile.am
@@ -0,0 +1,102 @@
+NULL=
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+bin_SCRIPTS= $(NTPSWEEP_DB)
+sbin_SCRIPTS= $(NTPSWEEP_DS)
+libexec_SCRIPTS= $(NTPSWEEP_DL)
+noinst_SCRIPTS= $(NTPSWEEP_NI)
+EXTRA_SCRIPTS= ntpsweep
+
+man1_MANS=
+man8_MANS=
+if INSTALL_NTPSWEEP
+man_MANS= ntpsweep.$(NTPSWEEP_MS)
+else
+noinst_MANS= ntpsweep.$(NTPSWEEP_MS)
+endif
+
+EXTRA_DIST = \
+ ntpsweep.in \
+ ntpsweep.1ntpsweepman \
+ ntpsweep.1ntpsweepmdoc \
+ ntpsweep.man.in \
+ ntpsweep.mdoc.in \
+ ntpsweep.texi \
+ ntpsweep.html \
+ ntpsweep-opts.def \
+ ntpsweep-opts \
+ invoke-ntpsweep.texi \
+ invoke-ntpsweep.menu \
+ $(NULL)
+
+html_DATA = ntpsweep.html
+
+CLEANFILES = ntpsweep.1
+DISTCLEANFILES = config.log $(man_MANS) $(noinst_MANS)
+
+noinst_DATA = \
+ ntpsweep.1 \
+ ntpsweep.1ntpsweepman \
+ ntpsweep.1ntpsweepmdoc \
+ ntpsweep.man.in \
+ ntpsweep.mdoc.in \
+ ntpsweep.texi \
+ ntpsweep.html \
+ ntpsweep-opts.def \
+ ntpsweep-opts \
+ invoke-ntpsweep.texi \
+ invoke-ntpsweep.menu \
+ $(NULL)
+
+ntpsweep: $(srcdir)/ntpsweep-opts
+
+$(srcdir)/ntpsweep-opts: ntpsweep-opts.def $(std_def_list)
+ $(run_ag) ntpsweep-opts.def
+
+### Nroff
+
+$(srcdir)/ntpsweep.1ntpsweepman: ntpsweep-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsweepman -Tagman-cmd.tpl ntpsweep-opts.def
+
+$(srcdir)/ntpsweep.man.in: ntpsweep.1ntpsweepman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepman > $(srcdir)/ntpsweep.man.in+
+ mv $(srcdir)/ntpsweep.man.in+ $(srcdir)/ntpsweep.man.in
+
+### Mdoc
+
+$(srcdir)/ntpsweep.1ntpsweepmdoc: ntpsweep-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsweepmdoc -Tagmdoc-cmd.tpl ntpsweep-opts.def
+
+$(srcdir)/ntpsweep.mdoc.in: ntpsweep.1ntpsweepmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepmdoc > $(srcdir)/ntpsweep.mdoc.in+
+ mv $(srcdir)/ntpsweep.mdoc.in+ $(srcdir)/ntpsweep.mdoc.in
+
+### Manpage
+
+ntpsweep.1: ntpsweep.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpsweep.1+:$(srcdir)/ntpsweep.$(MANTAGFMT).in
+ mv ntpsweep.1+ ntpsweep.1
+
+### Texinfo
+
+$(srcdir)/invoke-ntpsweep.menu: invoke-ntpsweep.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntpsweep.texi: ntpsweep-opts ntpsweep-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsweep-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/ntpsweep.html: invoke-ntpsweep.menu invoke-ntpsweep.texi ntpsweep.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpsweep.html ntpsweep.texi || true )
diff --git a/scripts/ntpsweep/Makefile.in b/scripts/ntpsweep/Makefile.in
new file mode 100644
index 000000000000..0e1a2b21fdb7
--- /dev/null
+++ b/scripts/ntpsweep/Makefile.in
@@ -0,0 +1,886 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = scripts/ntpsweep
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/ntpsweep.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = ntpsweep
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) $(noinst_SCRIPTS) \
+ $(sbin_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
+MAKE_LIBPARSE = @MAKE_LIBPARSE@
+MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
+MAKE_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+bin_SCRIPTS = $(NTPSWEEP_DB)
+sbin_SCRIPTS = $(NTPSWEEP_DS)
+libexec_SCRIPTS = $(NTPSWEEP_DL)
+noinst_SCRIPTS = $(NTPSWEEP_NI)
+EXTRA_SCRIPTS = ntpsweep
+man1_MANS =
+man8_MANS =
+@INSTALL_NTPSWEEP_TRUE@man_MANS = ntpsweep.$(NTPSWEEP_MS)
+@INSTALL_NTPSWEEP_FALSE@noinst_MANS = ntpsweep.$(NTPSWEEP_MS)
+EXTRA_DIST = \
+ ntpsweep.in \
+ ntpsweep.1ntpsweepman \
+ ntpsweep.1ntpsweepmdoc \
+ ntpsweep.man.in \
+ ntpsweep.mdoc.in \
+ ntpsweep.texi \
+ ntpsweep.html \
+ ntpsweep-opts.def \
+ ntpsweep-opts \
+ invoke-ntpsweep.texi \
+ invoke-ntpsweep.menu \
+ $(NULL)
+
+html_DATA = ntpsweep.html
+CLEANFILES = ntpsweep.1
+DISTCLEANFILES = config.log $(man_MANS) $(noinst_MANS)
+noinst_DATA = \
+ ntpsweep.1 \
+ ntpsweep.1ntpsweepman \
+ ntpsweep.1ntpsweepmdoc \
+ ntpsweep.man.in \
+ ntpsweep.mdoc.in \
+ ntpsweep.texi \
+ ntpsweep.html \
+ ntpsweep-opts.def \
+ ntpsweep-opts \
+ invoke-ntpsweep.texi \
+ invoke-ntpsweep.menu \
+ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/ntpsweep/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/ntpsweep/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+ntpsweep: $(top_builddir)/config.status $(srcdir)/ntpsweep.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-htmlDATA install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS install-libexecSCRIPTS \
+ install-sbinSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-htmlDATA \
+ uninstall-libexecSCRIPTS uninstall-man uninstall-sbinSCRIPTS
+
+uninstall-man: uninstall-man1 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binSCRIPTS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-htmlDATA install-info install-info-am \
+ install-libexecSCRIPTS install-man install-man1 install-man8 \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinSCRIPTS install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
+ uninstall-htmlDATA uninstall-libexecSCRIPTS uninstall-man \
+ uninstall-man1 uninstall-man8 uninstall-sbinSCRIPTS
+
+
+ntpsweep: $(srcdir)/ntpsweep-opts
+
+$(srcdir)/ntpsweep-opts: ntpsweep-opts.def $(std_def_list)
+ $(run_ag) ntpsweep-opts.def
+
+### Nroff
+
+$(srcdir)/ntpsweep.1ntpsweepman: ntpsweep-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsweepman -Tagman-cmd.tpl ntpsweep-opts.def
+
+$(srcdir)/ntpsweep.man.in: ntpsweep.1ntpsweepman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepman > $(srcdir)/ntpsweep.man.in+
+ mv $(srcdir)/ntpsweep.man.in+ $(srcdir)/ntpsweep.man.in
+
+### Mdoc
+
+$(srcdir)/ntpsweep.1ntpsweepmdoc: ntpsweep-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsweepmdoc -Tagmdoc-cmd.tpl ntpsweep-opts.def
+
+$(srcdir)/ntpsweep.mdoc.in: ntpsweep.1ntpsweepmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepmdoc > $(srcdir)/ntpsweep.mdoc.in+
+ mv $(srcdir)/ntpsweep.mdoc.in+ $(srcdir)/ntpsweep.mdoc.in
+
+### Manpage
+
+ntpsweep.1: ntpsweep.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpsweep.1+:$(srcdir)/ntpsweep.$(MANTAGFMT).in
+ mv ntpsweep.1+ ntpsweep.1
+
+### Texinfo
+
+$(srcdir)/invoke-ntpsweep.menu: invoke-ntpsweep.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntpsweep.texi: ntpsweep-opts ntpsweep-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsweep-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/ntpsweep.html: invoke-ntpsweep.menu invoke-ntpsweep.texi ntpsweep.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpsweep.html ntpsweep.texi || true )
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/scripts/ntpsweep/invoke-ntpsweep.menu b/scripts/ntpsweep/invoke-ntpsweep.menu
new file mode 100644
index 000000000000..6a1faea642f3
--- /dev/null
+++ b/scripts/ntpsweep/invoke-ntpsweep.menu
@@ -0,0 +1 @@
+* ntpsweep Invocation:: Invoking ntpsweep
diff --git a/scripts/ntpsweep/invoke-ntpsweep.texi b/scripts/ntpsweep/invoke-ntpsweep.texi
new file mode 100644
index 000000000000..c8917a53b56c
--- /dev/null
+++ b/scripts/ntpsweep/invoke-ntpsweep.texi
@@ -0,0 +1,118 @@
+@node ntpsweep Invocation
+@section Invoking ntpsweep
+@pindex ntpsweep
+@cindex Print various informations about given ntp servers
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-ntpsweep.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:44:55 AM by AutoGen 5.18.5pre4
+# From the definitions ntpsweep-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+@code{ntpsweep}
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{ntpsweep} program.
+
+@menu
+* ntpsweep usage:: ntpsweep help/usage (@option{--help})
+* ntpsweep host-list:: host-list option (-l)
+* ntpsweep peers:: peers option (-p)
+* ntpsweep maxlevel:: maxlevel option (-m)
+* ntpsweep strip:: strip option (-s)
+* ntpsweep host:: host option (-h)
+* ntpsweep exit status:: exit status
+@end menu
+
+@node ntpsweep usage
+@subsection ntpsweep help/usage (@option{--help})
+@cindex ntpsweep help
+
+This is the automatically generated usage text for ntpsweep.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8
+USAGE: ntpsweep [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [hostfile]
+
+ -l, --host-list=str Host to execute actions on
+ - may appear multiple times
+ -p, --peers Recursively list all peers a host synchronizes to
+ -m, --maxlevel=num Traverse peers up to this level (4 is a reasonable number)
+ -s, --strip=str Strip this string from hostnames
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+@end example
+@exampleindent 4
+
+@node ntpsweep host-list
+@subsection host-list option (-l)
+@cindex ntpsweep-host-list
+
+This is the ``host to execute actions on'' option.
+This option takes a string argument.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
+
+ Use this option to specify the host on which this script operates.
+ May appear multiple times.
+@node ntpsweep peers
+@subsection peers option (-p)
+@cindex ntpsweep-peers
+
+This is the ``recursively list all peers a host synchronizes to'' option.
+This option has no @samp{doc} documentation.
+@node ntpsweep maxlevel
+@subsection maxlevel option (-m)
+@cindex ntpsweep-maxlevel
+
+This is the ``traverse peers up to this level (4 is a reasonable number)'' option.
+This option takes a number argument.
+This option has no @samp{doc} documentation.
+@node ntpsweep strip
+@subsection strip option (-s)
+@cindex ntpsweep-strip
+
+This is the ``strip this string from hostnames'' option.
+This option takes a string argument.
+This option has no @samp{doc} documentation.
+@node ntpsweep host
+@subsection host option (-h)
+@cindex ntpsweep-host
+
+This is the ``specify a single host'' option.
+This option takes a string argument.
+This option has no @samp{doc} documentation.
+
+@strong{NOTE}@strong{: THIS OPTION IS DEPRECATED}
+@node ntpsweep exit status
+@subsection ntpsweep exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
diff --git a/scripts/ntpsweep/ntpsweep-opts b/scripts/ntpsweep/ntpsweep-opts
new file mode 100644
index 000000000000..fbddd827e755
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep-opts
@@ -0,0 +1,67 @@
+# EDIT THIS FILE WITH CAUTION (ntpsweep-opts)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:44:53 AM by AutoGen 5.18.5pre4
+# From the definitions ntpsweep-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'host-list' => [],
+ 'peers' => '',
+ 'maxlevel' => '',
+ 'strip' => '',
+ 'host' => '',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '[hostfile]';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'host-list|l=s', 'peers|p', 'maxlevel|m=i',
+ 'strip|s=s', 'host|h=s',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8
+USAGE: ntpsweep [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostfile]
+
+ -l, --host-list=str Host to execute actions on
+ - may appear multiple times
+ -p, --peers Recursively list all peers a host synchronizes to
+ -m, --maxlevel=num Traverse peers up to this level (4 is a reasonable number)
+ -s, --strip=str Strip this string from hostnames
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/ntpsweep/ntpsweep-opts.def b/scripts/ntpsweep/ntpsweep-opts.def
new file mode 100644
index 000000000000..23dc020e9b93
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep-opts.def
@@ -0,0 +1,66 @@
+/* -*- Mode: Text -*- */
+autogen definitions perlopt;
+
+#include autogen-version.def
+
+prog-name = 'ntpsweep';
+prog-title = 'Print various informations about given ntp servers';
+package = ntp;
+#include version.def
+
+argument = '[hostfile]';
+long-opts;
+gnu-usage;
+
+flag = {
+ name = host-list;
+ value = l;
+ arg-type = string;
+ max = NOLIMIT;
+ stack-arg;
+ descrip = 'Host to execute actions on';
+ doc = <<- _EndOfDoc_
+ Use this option to specify the host on which this script operates.
+ May appear multiple times.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = peers;
+ value = p;
+ descrip = 'Recursively list all peers a host synchronizes to';
+};
+
+flag = {
+ name = maxlevel;
+ value = m;
+ arg-type = number;
+ descrip = 'Traverse peers up to this level (4 is a reasonable number)';
+};
+
+flag = {
+ name = strip;
+ value = s;
+ arg-type = string;
+ descrip = 'Strip this string from hostnames';
+};
+
+/* Deprecated options */
+flag = {
+ name = host;
+ value = h;
+ arg-type = string;
+ descrip = 'Specify a single host';
+ deprecated;
+};
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+.Nm
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+ _END_PROG_MDOC_DESCRIP;
+};
diff --git a/scripts/ntpsweep/ntpsweep.1ntpsweepman b/scripts/ntpsweep/ntpsweep.1ntpsweepman
new file mode 100644
index 000000000000..45912acddaf6
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.1ntpsweepman
@@ -0,0 +1,97 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntpsweep 1ntpsweepman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-9Pa4E2/ag-kQaaE2)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:57 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpsweep-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntpsweep\fP
+\- Print various informations about given ntp servers
+.SH SYNOPSIS
+\f\*[B-Font]ntpsweep\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[hostfile]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]ntpsweep\fP
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-host\-list\f[]=\f\*[I-Font]string\f[]
+Host to execute actions on.
+This option may appear an unlimited number of times.
+.sp
+ Use this option to specify the host on which this script operates.
+ May appear multiple times.
+.TP
+.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
+Recursively list all peers a host synchronizes to.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-maxlevel\f[]=\f\*[I-Font]number\f[]
+Traverse peers up to this level (4 is a reasonable number).
+This option takes an integer number as its argument.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-strip\f[]=\f\*[I-Font]string\f[]
+Strip this string from hostnames.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-h\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-host\f[]=\f\*[I-Font]string\f[]
+Specify a single host.
+.sp
+This option has not been fully documented.
+.sp
+.B
+NOTE: THIS OPTION IS DEPRECATED
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBntpsweep\fP
+option definitions.
diff --git a/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc b/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
new file mode 100644
index 000000000000..edcb21de9dd4
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
@@ -0,0 +1,75 @@
+.Dd December 19 2014
+.Dt NTPSWEEP 1ntpsweepmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:00 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpsweep-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntpsweep
+.Nd Print various informations about given ntp servers
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[hostfile]
+.Pp
+.Sh DESCRIPTION
+.Nm
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl l Ar string , Fl \-host\-list Ns = Ns Ar string
+Host to execute actions on.
+This option may appear an unlimited number of times.
+.sp
+ Use this option to specify the host on which this script operates.
+ May appear multiple times.
+.It Fl p , Fl \-peers
+Recursively list all peers a host synchronizes to.
+.sp
+This option has not been fully documented.
+.It Fl m Ar number , Fl \-maxlevel Ns = Ns Ar number
+Traverse peers up to this level (4 is a reasonable number).
+This option takes an integer number as its argument.
+.sp
+This option has not been fully documented.
+.It Fl s Ar string , Fl \-strip Ns = Ns Ar string
+Strip this string from hostnames.
+.sp
+This option has not been fully documented.
+.It Fl h Ar string , Fl \-host Ns = Ns Ar string
+Specify a single host.
+.sp
+This option has not been fully documented.
+.sp
+.B
+NOTE: THIS OPTION IS DEPRECATED
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBntpsweep\fP
+option definitions.
diff --git a/scripts/ntpsweep/ntpsweep.html b/scripts/ntpsweep/ntpsweep.html
new file mode 100644
index 000000000000..d8c3b7cf0a1c
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.html
@@ -0,0 +1,201 @@
+<html lang="en">
+<head>
+<title>ntpsweep User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="ntpsweep User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">ntpsweep User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-Description">ntpsweep Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+ <p>This document describes the use of the NTP Project's <code>ntpsweep</code> program.
+
+ <p>This document applies to version 4.2.8 of <code>ntpsweep</code>.
+
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntpsweep-Description">ntpsweep Description</a>: Description
+<li><a accesskey="2" href="#ntpsweep-Invocation">ntpsweep Invocation</a>: Invoking ntpsweep
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntpsweep-Invocation"></a>
+<br>
+</div>
+
+<h3 class="section">0.1 Invoking ntpsweep</h3>
+
+<p><a name="index-ntpsweep-1"></a><a name="index-Print-various-informations-about-given-ntp-servers-2"></a>
+<code>ntpsweep</code>
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpsweep</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntpsweep-usage">ntpsweep usage</a>: ntpsweep help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#ntpsweep-host_002dlist">ntpsweep host-list</a>: host-list option (-l)
+<li><a accesskey="3" href="#ntpsweep-peers">ntpsweep peers</a>: peers option (-p)
+<li><a accesskey="4" href="#ntpsweep-maxlevel">ntpsweep maxlevel</a>: maxlevel option (-m)
+<li><a accesskey="5" href="#ntpsweep-strip">ntpsweep strip</a>: strip option (-s)
+<li><a accesskey="6" href="#ntpsweep-host">ntpsweep host</a>: host option (-h)
+<li><a accesskey="7" href="#ntpsweep-exit-status">ntpsweep exit status</a>: exit status
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntpsweep-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-host_002dlist">ntpsweep host-list</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.1 ntpsweep help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-ntpsweep-help-3"></a>
+This is the automatically generated usage text for ntpsweep.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8
+USAGE: ntpsweep [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [hostfile]
+
+ -l, --host-list=str Host to execute actions on
+ - may appear multiple times
+ -p, --peers Recursively list all peers a host synchronizes to
+ -m, --maxlevel=num Traverse peers up to this level (4 is a reasonable number)
+ -s, --strip=str Strip this string from hostnames
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+</pre>
+ <div class="node">
+<p><hr>
+<a name="ntpsweep-host_002dlist"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-peers">ntpsweep peers</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsweep-usage">ntpsweep usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.2 host-list option (-l)</h4>
+
+<p><a name="index-ntpsweep_002dhost_002dlist-4"></a>
+This is the &ldquo;host to execute actions on&rdquo; option.
+This option takes a string argument.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>may appear an unlimited number of times.
+</ul>
+
+ <p>Use this option to specify the host on which this script operates.
+ May appear multiple times.
+<div class="node">
+<p><hr>
+<a name="ntpsweep-peers"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-maxlevel">ntpsweep maxlevel</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsweep-host_002dlist">ntpsweep host-list</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.3 peers option (-p)</h4>
+
+<p><a name="index-ntpsweep_002dpeers-5"></a>
+This is the &ldquo;recursively list all peers a host synchronizes to&rdquo; option.
+This option has no <span class="samp">doc</span> documentation.
+<div class="node">
+<p><hr>
+<a name="ntpsweep-maxlevel"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-strip">ntpsweep strip</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsweep-peers">ntpsweep peers</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.4 maxlevel option (-m)</h4>
+
+<p><a name="index-ntpsweep_002dmaxlevel-6"></a>
+This is the &ldquo;traverse peers up to this level (4 is a reasonable number)&rdquo; option.
+This option takes a number argument.
+This option has no <span class="samp">doc</span> documentation.
+<div class="node">
+<p><hr>
+<a name="ntpsweep-strip"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-host">ntpsweep host</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsweep-maxlevel">ntpsweep maxlevel</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.5 strip option (-s)</h4>
+
+<p><a name="index-ntpsweep_002dstrip-7"></a>
+This is the &ldquo;strip this string from hostnames&rdquo; option.
+This option takes a string argument.
+This option has no <span class="samp">doc</span> documentation.
+<div class="node">
+<p><hr>
+<a name="ntpsweep-host"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-exit-status">ntpsweep exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsweep-strip">ntpsweep strip</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.6 host option (-h)</h4>
+
+<p><a name="index-ntpsweep_002dhost-8"></a>
+This is the &ldquo;specify a single host&rdquo; option.
+This option takes a string argument.
+This option has no <span class="samp">doc</span> documentation.
+
+ <p><strong>NOTE</strong><strong>: THIS OPTION IS DEPRECATED</strong>
+<div class="node">
+<p><hr>
+<a name="ntpsweep-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsweep-host">ntpsweep host</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.7 ntpsweep exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+
+</body></html>
+
diff --git a/scripts/ntpsweep/ntpsweep.in b/scripts/ntpsweep/ntpsweep.in
new file mode 100644
index 000000000000..fed35d17e1f0
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.in
@@ -0,0 +1,204 @@
+#! @PATH_PERL@ -w
+#
+# $Id$
+#
+# DISCLAIMER
+#
+# Copyright (C) 1999,2000 Hans Lambermont and Origin B.V.
+#
+# Permission to use, copy, modify and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appears in all copies and
+# that both the copyright notice and this permission notice appear in
+# supporting documentation. This software is supported as is and without
+# any express or implied warranties, including, without limitation, the
+# implied warranties of merchantability and fitness for a particular
+# purpose. The name Origin B.V. must not be used to endorse or promote
+# products derived from this software without prior written permission.
+#
+# Hans Lambermont <ntpsweep@lambermont.dyndns.org>
+
+package ntpsweep;
+use 5.006_000;
+use strict;
+use lib "@PERLLIBDIR@";
+use NTP::Util qw(do_dns ntp_read_vars ntp_peers ntp_sntp_line);
+
+(my $program = $0) =~ s%.*/(.+?)(.pl)?$%$1%;
+my ($showpeers, $maxlevel, $strip);
+my (%known_host_info, %known_host_peers);
+
+exit run(@ARGV) unless caller;
+
+sub run {
+ my $opts;
+ if (!processOptions(\@_, $opts) ||
+ (((@_ != 1) && !$opts->{host} && !@{$opts->{'host-list'}}))) {
+ usage(1);
+ };
+
+ # no STDOUT buffering
+ $| = 1;
+ ($showpeers, $maxlevel, $strip) =
+ ($opts->{peers}, $opts->{maxlevel}, $opts->{strip});
+
+ my $hostsfile = shift;
+
+ # Main program
+
+ my @hosts;
+
+ if ($opts->{host}) {
+ push @hosts, $opts->{host};
+ }
+ else {
+ @hosts = read_hosts($hostsfile) if $hostsfile;
+ push @hosts, @{$opts->{'host-list'}};
+ }
+
+ # Print header
+ print <<EOF;
+Host st offset(s) version system processor
+--------------------------------+--+---------+-----------+------------+---------
+EOF
+
+ %known_host_info = ();
+ %known_host_peers = ();
+ scan_hosts(@hosts);
+
+ return 0;
+}
+
+sub scan_hosts {
+ my (@hosts) = @_;
+
+ my $host;
+ for $host (@hosts) {
+ scan_host($host, 0, $host => 1);
+ }
+}
+
+sub read_hosts {
+ my ($hostsfile) = @_;
+ my @hosts;
+
+ open my $hosts, $hostsfile
+ or die "$program: FATAL: unable to read $hostsfile: $!\n";
+
+ while (<$hosts>) {
+ next if /^\s*(#|$)/; # comment/empty
+ chomp;
+ push @hosts, $_;
+ }
+
+ close $hosts;
+ return @hosts;
+}
+
+sub scan_host {
+ my ($host, $level, %trace) = @_;
+ my $stratum = 0;
+ my $offset = 0;
+ my $daemonversion = "";
+ my $system = "";
+ my $processor = "";
+ my @peers;
+ my $known_host = 0;
+
+ if (exists $known_host_info{$host}) {
+ $known_host = 1;
+ }
+ else {
+ ($offset, $stratum) = ntp_sntp_line($host);
+
+ # got answers ? If so, go on.
+ if ($stratum) {
+ my $vars = ntp_read_vars(0, [qw(processor system daemon_version)], $host) || {};
+ $daemonversion = $vars->{daemon_version};
+ $system = $vars->{system};
+ $processor = $vars->{processor};
+
+ # Shorten daemon_version string.
+ $daemonversion =~ s/(;|Mon|Tue|Wed|Thu|Fri|Sat|Sun).*$//;
+ $daemonversion =~ s/version=//;
+ $daemonversion =~ s/(x|)ntpd //;
+ $daemonversion =~ s/(\(|\))//g;
+ $daemonversion =~ s/beta/b/;
+ $daemonversion =~ s/multicast/mc/;
+
+ # Shorten system string
+ $system =~ s/UNIX\///;
+ $system =~ s/RELEASE/r/;
+ $system =~ s/CURRENT/c/;
+
+ # Shorten processor string
+ $processor =~ s/unknown//;
+ }
+
+ # got answers ? If so, go on.
+ if ($daemonversion) {
+ if ($showpeers) {
+ my @peers_tmp = ntp_peers($host);
+ for (@peers_tmp) {
+ $_->{remote} =~ s/^(?: |x|\.|-|\+|#|\*|o)([^ ]+)/$1/;
+ push @peers, $_->{remote};
+ }
+ }
+ }
+
+ # Add scanned host to known_hosts array
+ #push @known_hosts, $host;
+ if ($stratum) {
+ $known_host_info{$host} = sprintf "%2d %9.3f %-11s %-12s %s",
+ $stratum, $offset, (substr $daemonversion, 0, 11),
+ (substr $system, 0, 12), (substr $processor, 0, 9);
+ }
+ else {
+ # Stratum level 0 is consider invalid
+ $known_host_info{$host} = " ?";
+ }
+ $known_host_peers{$host} = [@peers];
+ }
+
+ if ($stratum || $known_host) { # Valid or known host
+ my $printhost = ' ' x $level . (do_dns($host) || $host);
+ # Shorten host string
+ if ($strip) {
+ $printhost =~ s/$strip//;
+ }
+ # append number of peers in brackets if requested and valid
+ if ($showpeers && ($known_host_info{$host} ne " ?")) {
+ $printhost .= " (" . @{$known_host_peers{$host}} . ")";
+ }
+ # Finally print complete host line
+ printf "%-32s %s\n",
+ (substr $printhost, 0, 32), $known_host_info{$host};
+ if ($showpeers && ($maxlevel ? $level < $maxlevel : 1)) {
+ $trace{$host} = 1;
+ # Loop through peers
+ foreach my $peer (@{$known_host_peers{$host}}) {
+ if (exists $trace{$peer}) {
+ # we've detected a loop !
+ $printhost = ' ' x ($level + 1) . "= " . $peer;
+ # Shorten host string
+ $printhost =~ s/$strip// if $strip;
+ printf "%-32s\n", substr $printhost, 0, 32;
+ } else {
+ if ((substr $peer, 0, 3) ne "127") {
+ scan_host($peer, $level + 1, %trace);
+ }
+ }
+ }
+ }
+ }
+ else { # We did not get answers from this host
+ my $printhost = ' ' x $level . (do_dns($host) || $host);
+ $printhost =~ s/$strip// if $strip;
+ printf "%-32s ?\n", substr $printhost, 0, 32;
+ }
+}
+
+@ntpsweep_opts@
+
+1;
+__END__
diff --git a/scripts/ntpsweep/ntpsweep.man.in b/scripts/ntpsweep/ntpsweep.man.in
new file mode 100644
index 000000000000..45912acddaf6
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.man.in
@@ -0,0 +1,97 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntpsweep 1ntpsweepman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-9Pa4E2/ag-kQaaE2)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:57 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpsweep-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntpsweep\fP
+\- Print various informations about given ntp servers
+.SH SYNOPSIS
+\f\*[B-Font]ntpsweep\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[hostfile]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]ntpsweep\fP
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-host\-list\f[]=\f\*[I-Font]string\f[]
+Host to execute actions on.
+This option may appear an unlimited number of times.
+.sp
+ Use this option to specify the host on which this script operates.
+ May appear multiple times.
+.TP
+.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
+Recursively list all peers a host synchronizes to.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-maxlevel\f[]=\f\*[I-Font]number\f[]
+Traverse peers up to this level (4 is a reasonable number).
+This option takes an integer number as its argument.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-strip\f[]=\f\*[I-Font]string\f[]
+Strip this string from hostnames.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-h\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-host\f[]=\f\*[I-Font]string\f[]
+Specify a single host.
+.sp
+This option has not been fully documented.
+.sp
+.B
+NOTE: THIS OPTION IS DEPRECATED
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBntpsweep\fP
+option definitions.
diff --git a/scripts/ntpsweep/ntpsweep.mdoc.in b/scripts/ntpsweep/ntpsweep.mdoc.in
new file mode 100644
index 000000000000..edcb21de9dd4
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.mdoc.in
@@ -0,0 +1,75 @@
+.Dd December 19 2014
+.Dt NTPSWEEP 1ntpsweepmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:00 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpsweep-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntpsweep
+.Nd Print various informations about given ntp servers
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[hostfile]
+.Pp
+.Sh DESCRIPTION
+.Nm
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl l Ar string , Fl \-host\-list Ns = Ns Ar string
+Host to execute actions on.
+This option may appear an unlimited number of times.
+.sp
+ Use this option to specify the host on which this script operates.
+ May appear multiple times.
+.It Fl p , Fl \-peers
+Recursively list all peers a host synchronizes to.
+.sp
+This option has not been fully documented.
+.It Fl m Ar number , Fl \-maxlevel Ns = Ns Ar number
+Traverse peers up to this level (4 is a reasonable number).
+This option takes an integer number as its argument.
+.sp
+This option has not been fully documented.
+.It Fl s Ar string , Fl \-strip Ns = Ns Ar string
+Strip this string from hostnames.
+.sp
+This option has not been fully documented.
+.It Fl h Ar string , Fl \-host Ns = Ns Ar string
+Specify a single host.
+.sp
+This option has not been fully documented.
+.sp
+.B
+NOTE: THIS OPTION IS DEPRECATED
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBntpsweep\fP
+option definitions.
diff --git a/scripts/ntpsweep/ntpsweep.texi b/scripts/ntpsweep/ntpsweep.texi
new file mode 100644
index 000000000000..e408065a65fb
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.texi
@@ -0,0 +1,43 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename ntpsweep.info
+@settitle ntpsweep User's Manual
+@include ../../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{ntpsweep},
+a program from
+the NTP Project,
+that is used to wait until @code{ntpd} has been able to
+synchronize and stabilize the time on the current host.
+@end ifinfo
+
+@direntry
+* ntpsweep: (ntpsweep). Wait for ntpd to synchronize and stabilize the system clock.
+@end direntry
+
+@titlepage
+@title ntpsweep User's Manual
+@subtitle ntpsweep, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, ntpsweep Description, (dir), (dir)
+
+This document describes the use of the NTP Project's @code{ntpsweep} program.
+
+This document applies to version @value{VERSION} of @code{ntpsweep}.
+
+@shortcontents
+
+@menu
+* ntpsweep Description:: Description
+* ntpsweep Invocation:: Invoking ntpsweep
+@end menu
+
+@include invoke-ntpsweep.texi
diff --git a/scripts/ntptrace.in b/scripts/ntptrace.in
deleted file mode 100755
index d44dab46d834..000000000000
--- a/scripts/ntptrace.in
+++ /dev/null
@@ -1,71 +0,0 @@
-#! @PATH_PERL@ -w
-
-# John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org
-
-use Socket;
-use Getopt::Std;
-use vars qw($opt_n $opt_m);
-
-$ntpq = "ntpq";
-
-$Getopt::Std::STANDARD_HELP_VERSION=1;
-getopts('nm:');
-
-$dodns = 1;
-$dodns = 0 if (defined($opt_n));
-
-$max_hosts = (defined($opt_m) ? $opt_m : 99);
-$max_hosts = 0 if ( $max_hosts !~ /^\d+$/ );
-$nb_host = 1;
-
-$host = shift;
-$host ||= "127.0.0.1";
-
-for (;;) {
- $nb_host++;
- $rootdelay = 0;
- $rootdispersion = 0;
- $stratum = 255;
- $cmd = "$ntpq -n -c rv $host";
- open(PH, $cmd . "|") || die "failed to start command $cmd: $!";
- while (<PH>) {
- $stratum = $1 if (/stratum=(\d+)/);
- $peer = $1 if (/peer=(\d+)/);
- # Very old servers report phase and not offset.
- $offset = $1 if (/(?:offset|phase)=([^\s,]+)/);
- $rootdelay = $1 if (/rootdelay=([^\s,]+)/);
- $rootdispersion = $1 if (/rootdispersion=([^\s,]+)/);
- $refid = $1 if (/refid=([^\s,]+)/);
- }
- close(PH) || die "$cmd failed";
- last if ($stratum == 255);
- $offset /= 1000;
- $syncdistance = ($rootdispersion + ($rootdelay / 2)) / 1000;
- $dhost = $host;
- # Only do lookups of IPv4 addresses. The standard lookup functions
- # of perl only do IPv4 and I don't know if we should require extras.
- if ($dodns && $host =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/) {
- $iaddr = inet_aton($host);
- $name = (gethostbyaddr($iaddr, AF_INET))[0];
- $dhost = $name if (defined($name));
- }
- printf("%s: stratum %d, offset %f, synch distance %f",
- $dhost, $stratum, $offset, $syncdistance);
- printf(", refid '%s'", $refid) if ($stratum == 1);
- printf("\n");
- last if ($stratum == 0 || $stratum == 1 || $stratum == 16);
- last if ($refid =~ /^127\.127\.\d{1,3}\.\d{1,3}$/);
- last if ($nb_host > $max_hosts);
-
- $cmd = "$ntpq -n -c \"pstat $peer\" $host";
- open(PH, $cmd . "|") || die "failed to start command $cmd: $!";
- $thost = "";
- while (<PH>) {
- $thost = $1, last if (/srcadr=(\S+),/);
- }
- close(PH) || die "$cmd failed";
- last if ($thost eq "");
- last if ($thost =~ /^127\.127\.\d{1,3}\.\d{1,3}$/);
- $host = $thost;
-}
-
diff --git a/scripts/ntptrace/Makefile.am b/scripts/ntptrace/Makefile.am
new file mode 100644
index 000000000000..19300e8cb880
--- /dev/null
+++ b/scripts/ntptrace/Makefile.am
@@ -0,0 +1,95 @@
+NULL=
+man1_MANS=
+man8_MANS=
+man_MANS= ntptrace.$(NTPTRACE_MS)
+
+bin_SCRIPTS = $(NTPTRACE_DB)
+libexec_SCRIPTS = $(NTPTRACE_DL)
+sbin_SCRIPTS = $(NTPTRACE_DS)
+
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+EXTRA_SCRIPTS = ntptrace
+
+EXTRA_DIST = \
+ ntptrace.1ntptraceman \
+ ntptrace.1ntptracemdoc \
+ ntptrace.mdoc.in \
+ ntptrace.man.in \
+ ntptrace.texi \
+ ntptrace.html \
+ ntptrace-opts.def \
+ ntptrace-opts \
+ invoke-ntptrace.texi \
+ invoke-ntptrace.menu \
+ $(NULL)
+
+DISTCLEANFILES = config.log $(man_MANS)
+
+html_DATA = $(srcdir)/ntptrace.html
+
+noinst_DATA = \
+ ntptrace.1ntptraceman \
+ ntptrace.1ntptracemdoc \
+ ntptrace.mdoc.in \
+ ntptrace.man.in \
+ ntptrace.texi \
+ ntptrace.html \
+ ntptrace-opts.def \
+ ntptrace-opts \
+ invoke-ntptrace.texi \
+ invoke-ntptrace.menu \
+ $(NULL)
+
+ntptrace: $(srcdir)/ntptrace-opts
+
+$(srcdir)/ntptrace-opts: $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) ntptrace-opts.def
+
+### Nroff
+
+$(srcdir)/ntptrace.1ntptraceman: $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntptraceman -Tagman-cmd.tpl ntptrace-opts.def
+
+$(srcdir)/ntptrace.man.in: $(srcdir)/ntptrace.1ntptraceman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptraceman > $(srcdir)/ntptrace.man.in+
+ mv $(srcdir)/ntptrace.man.in+ $(srcdir)/ntptrace.man.in
+
+### Mdoc
+
+$(srcdir)/ntptrace.1ntptracemdoc: $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntptracemdoc -Tagmdoc-cmd.tpl ntptrace-opts.def
+
+$(srcdir)/ntptrace.mdoc.in: $(srcdir)/ntptrace.1ntptracemdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptracemdoc > $(srcdir)/ntptrace.mdoc.in+
+ mv $(srcdir)/ntptrace.mdoc.in+ $(srcdir)/ntptrace.mdoc.in
+
+### Manpage (local)
+
+ntptrace.$(NTPTRACE_MS): $(srcdir)/ntptrace.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntptrace.$(NTPTRACE_MS)+:$(srcdir)/ntptrace.$(MANTAGFMT).in
+ mv ntptrace.$(NTPTRACE_MS)+ ntptrace.$(NTPTRACE_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-ntptrace.menu: $(srcdir)/invoke-ntptrace.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntptrace.texi: ntptrace-opts $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntptrace-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/ntptrace.html: $(srcdir)/invoke-ntptrace.menu $(srcdir)/invoke-ntptrace.texi $(srcdir)/ntptrace.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntptrace.html ntptrace.texi || true )
diff --git a/scripts/ntptrace/Makefile.in b/scripts/ntptrace/Makefile.in
new file mode 100644
index 000000000000..a59e9362b263
--- /dev/null
+++ b/scripts/ntptrace/Makefile.in
@@ -0,0 +1,879 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = scripts/ntptrace
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/ntptrace.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = ntptrace
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) $(sbin_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
+MAKE_LIBPARSE = @MAKE_LIBPARSE@
+MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
+MAKE_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+man1_MANS =
+man8_MANS =
+man_MANS = ntptrace.$(NTPTRACE_MS)
+bin_SCRIPTS = $(NTPTRACE_DB)
+libexec_SCRIPTS = $(NTPTRACE_DL)
+sbin_SCRIPTS = $(NTPTRACE_DS)
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+EXTRA_SCRIPTS = ntptrace
+EXTRA_DIST = \
+ ntptrace.1ntptraceman \
+ ntptrace.1ntptracemdoc \
+ ntptrace.mdoc.in \
+ ntptrace.man.in \
+ ntptrace.texi \
+ ntptrace.html \
+ ntptrace-opts.def \
+ ntptrace-opts \
+ invoke-ntptrace.texi \
+ invoke-ntptrace.menu \
+ $(NULL)
+
+DISTCLEANFILES = config.log $(man_MANS)
+html_DATA = $(srcdir)/ntptrace.html
+noinst_DATA = \
+ ntptrace.1ntptraceman \
+ ntptrace.1ntptracemdoc \
+ ntptrace.mdoc.in \
+ ntptrace.man.in \
+ ntptrace.texi \
+ ntptrace.html \
+ ntptrace-opts.def \
+ ntptrace-opts \
+ invoke-ntptrace.texi \
+ invoke-ntptrace.menu \
+ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/ntptrace/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/ntptrace/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+ntptrace: $(top_builddir)/config.status $(srcdir)/ntptrace.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-htmlDATA install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS install-libexecSCRIPTS \
+ install-sbinSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-htmlDATA \
+ uninstall-libexecSCRIPTS uninstall-man uninstall-sbinSCRIPTS
+
+uninstall-man: uninstall-man1 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binSCRIPTS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-htmlDATA install-info install-info-am \
+ install-libexecSCRIPTS install-man install-man1 install-man8 \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinSCRIPTS install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
+ uninstall-htmlDATA uninstall-libexecSCRIPTS uninstall-man \
+ uninstall-man1 uninstall-man8 uninstall-sbinSCRIPTS
+
+
+ntptrace: $(srcdir)/ntptrace-opts
+
+$(srcdir)/ntptrace-opts: $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) ntptrace-opts.def
+
+### Nroff
+
+$(srcdir)/ntptrace.1ntptraceman: $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntptraceman -Tagman-cmd.tpl ntptrace-opts.def
+
+$(srcdir)/ntptrace.man.in: $(srcdir)/ntptrace.1ntptraceman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptraceman > $(srcdir)/ntptrace.man.in+
+ mv $(srcdir)/ntptrace.man.in+ $(srcdir)/ntptrace.man.in
+
+### Mdoc
+
+$(srcdir)/ntptrace.1ntptracemdoc: $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntptracemdoc -Tagmdoc-cmd.tpl ntptrace-opts.def
+
+$(srcdir)/ntptrace.mdoc.in: $(srcdir)/ntptrace.1ntptracemdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptracemdoc > $(srcdir)/ntptrace.mdoc.in+
+ mv $(srcdir)/ntptrace.mdoc.in+ $(srcdir)/ntptrace.mdoc.in
+
+### Manpage (local)
+
+ntptrace.$(NTPTRACE_MS): $(srcdir)/ntptrace.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntptrace.$(NTPTRACE_MS)+:$(srcdir)/ntptrace.$(MANTAGFMT).in
+ mv ntptrace.$(NTPTRACE_MS)+ ntptrace.$(NTPTRACE_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-ntptrace.menu: $(srcdir)/invoke-ntptrace.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntptrace.texi: ntptrace-opts $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntptrace-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/ntptrace.html: $(srcdir)/invoke-ntptrace.menu $(srcdir)/invoke-ntptrace.texi $(srcdir)/ntptrace.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntptrace.html ntptrace.texi || true )
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/scripts/ntptrace/invoke-ntptrace.menu b/scripts/ntptrace/invoke-ntptrace.menu
new file mode 100644
index 000000000000..bea3b8b23f4d
--- /dev/null
+++ b/scripts/ntptrace/invoke-ntptrace.menu
@@ -0,0 +1 @@
+* ntptrace Invocation:: Invoking ntptrace
diff --git a/scripts/ntptrace/invoke-ntptrace.texi b/scripts/ntptrace/invoke-ntptrace.texi
new file mode 100644
index 000000000000..403961774924
--- /dev/null
+++ b/scripts/ntptrace/invoke-ntptrace.texi
@@ -0,0 +1,109 @@
+@node ntptrace Invocation
+@section Invoking ntptrace
+@pindex ntptrace
+@cindex Trace peers of an NTP server
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-ntptrace.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:45:07 AM by AutoGen 5.18.5pre4
+# From the definitions ntptrace-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+@code{ntptrace} is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+
+If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+
+@example
+% ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135
+server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu:
+stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
+@end example
+
+On each line, the fields are (left to right): the host name, the host stratum,
+the time offset between that host and the local host (as measured by
+@code{ntptrace}; this is why it is not always zero for "localhost"), the host
+synchronization distance, and (only for stratum-1 servers) the reference clock
+ID. All times are given in seconds. Note that the stratum is the server hop
+count to the primary source, while the synchronization distance is the
+estimated error relative to the primary source. These terms are precisely
+defined in RFC-1305.
+
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{ntptrace} program.
+
+@menu
+* ntptrace usage:: ntptrace help/usage (@option{--help})
+* ntptrace numeric:: numeric option (-n)
+* ntptrace max-hosts:: max-hosts option (-m)
+* ntptrace host:: host option (-r)
+* ntptrace exit status:: exit status
+@end menu
+
+@node ntptrace usage
+@subsection ntptrace help/usage (@option{--help})
+@cindex ntptrace help
+
+This is the automatically generated usage text for ntptrace.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8
+USAGE: ntptrace [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [host]
+
+ -n, --numeric Print IP addresses instead of hostnames
+ -m, --max-hosts=num Maximum number of peers to trace
+ -r, --host=str Single remote host
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+@end example
+@exampleindent 4
+
+@node ntptrace numeric
+@subsection numeric option (-n)
+@cindex ntptrace-numeric
+
+This is the ``print ip addresses instead of hostnames'' option.
+Output hosts as dotted-quad numeric format rather than converting to
+the canonical host names.
+@node ntptrace max-hosts
+@subsection max-hosts option (-m)
+@cindex ntptrace-max-hosts
+
+This is the ``maximum number of peers to trace'' option.
+This option takes a number argument.
+This option has no @samp{doc} documentation.
+@node ntptrace host
+@subsection host option (-r)
+@cindex ntptrace-host
+
+This is the ``single remote host'' option.
+This option takes a string argument.
+This option has no @samp{doc} documentation.
+@node ntptrace exit status
+@subsection ntptrace exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
diff --git a/scripts/ntptrace/ntptrace-opts b/scripts/ntptrace/ntptrace-opts
new file mode 100644
index 000000000000..65b6e277a2c8
--- /dev/null
+++ b/scripts/ntptrace/ntptrace-opts
@@ -0,0 +1,62 @@
+# EDIT THIS FILE WITH CAUTION (ntptrace-opts)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:45:02 AM by AutoGen 5.18.5pre4
+# From the definitions ntptrace-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'numeric' => '',
+ 'max-hosts' => '99',
+ 'host' => '127.0.0.1',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '[host]';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'numeric|n', 'max-hosts|m=i', 'host|r=s',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8
+USAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host]
+
+ -n, --numeric Print IP addresses instead of hostnames
+ -m, --max-hosts=num Maximum number of peers to trace
+ -r, --host=str Single remote host
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/ntptrace/ntptrace-opts.def b/scripts/ntptrace/ntptrace-opts.def
new file mode 100644
index 000000000000..81ddda3b209a
--- /dev/null
+++ b/scripts/ntptrace/ntptrace-opts.def
@@ -0,0 +1,69 @@
+/* -*- Mode: Text -*- */
+AutoGen Definitions perlopt;
+
+//#include copyright.def
+#include autogen-version.def
+
+prog-name = 'ntptrace';
+prog-title = 'Trace peers of an NTP server';
+package = ntp;
+#include version.def
+argument = '[host]';
+
+long-opts;
+gnu-usage;
+
+flag = {
+ name = numeric;
+ value = n;
+ descrip = 'Print IP addresses instead of hostnames';
+ doc = <<- _EndOfDoc_
+ Output hosts as dotted-quad numeric format rather than converting to
+ the canonical host names.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = max-hosts;
+ value = m;
+ arg-type = number;
+ arg-default = 99;
+ descrip = 'Maximum number of peers to trace';
+};
+
+flag = {
+ name = host;
+ value = r;
+ arg-type = string;
+ arg-default = '127.0.0.1';
+ descrip = 'Single remote host';
+};
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'texi';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+@code{ntptrace} is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+
+If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+
+@example
+% ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135
+server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu:
+stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
+@end example
+
+On each line, the fields are (left to right): the host name, the host stratum,
+the time offset between that host and the local host (as measured by
+@code{ntptrace}; this is why it is not always zero for "localhost"), the host
+synchronization distance, and (only for stratum-1 servers) the reference clock
+ID. All times are given in seconds. Note that the stratum is the server hop
+count to the primary source, while the synchronization distance is the
+estimated error relative to the primary source. These terms are precisely
+defined in RFC-1305.
+ _END_PROG_MDOC_DESCRIP;
+};
diff --git a/scripts/ntptrace/ntptrace.1ntptraceman b/scripts/ntptrace/ntptrace.1ntptraceman
new file mode 100644
index 000000000000..aa4e63370483
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.1ntptraceman
@@ -0,0 +1,114 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntptrace 1ntptraceman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-ryayX3/ag-EyaGW3)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:04 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntptrace-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntptrace\fP
+\- Trace peers of an NTP server
+.SH SYNOPSIS
+\f\*[B-Font]ntptrace\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[host]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\fBntptrace\fP is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+.sp
+If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+.sp
+.br
+.in +4
+.nf
+% ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135
+server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu:
+stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
+.in -4
+.fi
+.sp
+On each line, the fields are (left to right): the host name, the host stratum,
+the time offset between that host and the local host (as measured by
+\fBntptrace\fP; this is why it is not always zero for "localhost"), the host
+synchronization distance, and (only for stratum\-1 servers) the reference clock
+ID. All times are given in seconds. Note that the stratum is the server hop
+count to the primary source, while the synchronization distance is the
+estimated error relative to the primary source. These terms are precisely
+defined in RFC\-1305.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-numeric\f[]
+Print IP addresses instead of hostnames.
+.sp
+Output hosts as dotted-quad numeric format rather than converting to
+the canonical host names.
+.TP
+.NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-max\-hosts\f[]=\f\*[I-Font]number\f[]
+Maximum number of peers to trace.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]number\f[]
+for this option is:
+.ti +4
+ 99
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-r\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-host\f[]=\f\*[I-Font]string\f[]
+Single remote host.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ 127.0.0.1
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBntptrace\fP
+option definitions.
diff --git a/scripts/ntptrace/ntptrace.1ntptracemdoc b/scripts/ntptrace/ntptrace.1ntptracemdoc
new file mode 100644
index 000000000000..17c0c788815f
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.1ntptracemdoc
@@ -0,0 +1,91 @@
+.Dd December 19 2014
+.Dt NTPTRACE 1ntptracemdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:09 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntptrace-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntptrace
+.Nd Trace peers of an NTP server
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[host]
+.Pp
+.Sh DESCRIPTION
+\fBntptrace\fP is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+.sp
+If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+.sp
+.Bd -literal -offset indent
+% ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135
+server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu:
+stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
+.Ed
+.sp
+On each line, the fields are (left to right): the host name, the host stratum,
+the time offset between that host and the local host (as measured by
+\fBntptrace\fP; this is why it is not always zero for "localhost"), the host
+synchronization distance, and (only for stratum\-1 servers) the reference clock
+ID. All times are given in seconds. Note that the stratum is the server hop
+count to the primary source, while the synchronization distance is the
+estimated error relative to the primary source. These terms are precisely
+defined in RFC\-1305.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl n , Fl \-numeric
+Print IP addresses instead of hostnames.
+.sp
+Output hosts as dotted\-quad numeric format rather than converting to
+the canonical host names.
+.It Fl m Ar number , Fl \-max\-hosts Ns = Ns Ar number
+Maximum number of peers to trace.
+This option takes an integer number as its argument.
+The default
+.Ar number
+for this option is:
+.ti +4
+ 99
+.sp
+This option has not been fully documented.
+.It Fl r Ar string , Fl \-host Ns = Ns Ar string
+Single remote host.
+The default
+.Ar string
+for this option is:
+.ti +4
+ 127.0.0.1
+.sp
+This option has not been fully documented.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBntptrace\fP
+option definitions.
diff --git a/scripts/ntptrace/ntptrace.html b/scripts/ntptrace/ntptrace.html
new file mode 100644
index 000000000000..a0323a94ebec
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.html
@@ -0,0 +1,180 @@
+<html lang="en">
+<head>
+<title>Ntptrace User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="Ntptrace User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">Ntptrace User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-Description">ntptrace Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">Simple Network Time Protocol User Manual</h2>
+
+<p>This document describes the use of the NTP Project's <code>ntptrace</code> program.
+This document applies to version 4.2.8 of <code>ntptrace</code>.
+
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">Simple Network Time Protocol User Manual</a>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntptrace-Description">ntptrace Description</a>: Description
+<li><a accesskey="2" href="#ntptrace-Invocation">ntptrace Invocation</a>: Invoking ntptrace
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntptrace-Invocation"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-Description">ntptrace Description</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<h3 class="section">Invoking ntptrace</h3>
+
+<p><a name="index-ntptrace-1"></a><a name="index-Trace-peers-of-an-NTP-server-2"></a>
+<code>ntptrace</code> is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+
+ <p>If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+
+<pre class="example"> % ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135
+ server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu:
+ stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
+</pre>
+ <p>On each line, the fields are (left to right): the host name, the host stratum,
+the time offset between that host and the local host (as measured by
+<code>ntptrace</code>; this is why it is not always zero for "localhost"), the host
+synchronization distance, and (only for stratum-1 servers) the reference clock
+ID. All times are given in seconds. Note that the stratum is the server hop
+count to the primary source, while the synchronization distance is the
+estimated error relative to the primary source. These terms are precisely
+defined in RFC-1305.
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntptrace</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntptrace-usage">ntptrace usage</a>: ntptrace help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#ntptrace-numeric">ntptrace numeric</a>: numeric option (-n)
+<li><a accesskey="3" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>: max-hosts option (-m)
+<li><a accesskey="4" href="#ntptrace-host">ntptrace host</a>: host option (-r)
+<li><a accesskey="5" href="#ntptrace-exit-status">ntptrace exit status</a>: exit status
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntptrace-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-numeric">ntptrace numeric</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntptrace help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-ntptrace-help-3"></a>
+This is the automatically generated usage text for ntptrace.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8
+USAGE: ntptrace [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [host]
+
+ -n, --numeric Print IP addresses instead of hostnames
+ -m, --max-hosts=num Maximum number of peers to trace
+ -r, --host=str Single remote host
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+</pre>
+ <div class="node">
+<p><hr>
+<a name="ntptrace-numeric"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-usage">ntptrace usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">numeric option (-n)</h4>
+
+<p><a name="index-ntptrace_002dnumeric-4"></a>
+This is the &ldquo;print ip addresses instead of hostnames&rdquo; option.
+Output hosts as dotted-quad numeric format rather than converting to
+the canonical host names.
+<div class="node">
+<p><hr>
+<a name="ntptrace-max_002dhosts"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-host">ntptrace host</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-numeric">ntptrace numeric</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">max-hosts option (-m)</h4>
+
+<p><a name="index-ntptrace_002dmax_002dhosts-5"></a>
+This is the &ldquo;maximum number of peers to trace&rdquo; option.
+This option takes a number argument.
+This option has no <span class="samp">doc</span> documentation.
+<div class="node">
+<p><hr>
+<a name="ntptrace-host"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-exit-status">ntptrace exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">host option (-r)</h4>
+
+<p><a name="index-ntptrace_002dhost-6"></a>
+This is the &ldquo;single remote host&rdquo; option.
+This option takes a string argument.
+This option has no <span class="samp">doc</span> documentation.
+<div class="node">
+<p><hr>
+<a name="ntptrace-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-host">ntptrace host</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntptrace exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+
+</body></html>
+
diff --git a/scripts/ntptrace/ntptrace.in b/scripts/ntptrace/ntptrace.in
new file mode 100755
index 000000000000..7cc5ce7f7224
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.in
@@ -0,0 +1,80 @@
+#! @PATH_PERL@ -w
+# John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org
+
+package ntptrace;
+use 5.006_000;
+use strict;
+use lib "@PERLLIBDIR@";
+use NTP::Util qw(ntp_read_vars do_dns);
+
+exit run(@ARGV) unless caller;
+
+sub run {
+ my $opts;
+ if (!processOptions(\@_, $opts)) {
+ usage(1);
+ };
+
+ my $dodns = $opts->{numeric} ? 0 : 1;
+ my $max_hosts = $opts->{'max-hosts'};
+ my $host = shift || $opts->{host};
+ my $nb_host = 0;
+
+ for (;;) {
+ $nb_host++;
+
+ my %info = get_info($host);
+ last if not %info;
+
+ my $dhost = $host;
+ if ($dodns) {
+ my $name = do_dns($host);
+ $dhost = $name if defined $name;
+ }
+
+ printf "%s: stratum %d, offset %f, synch distance %f",
+ $dhost, $info{stratum}, $info{offset}, $info{syncdistance};
+ printf ", refid '%s'", $info{refid} if $info{stratum} == 1;
+ print "\n";
+
+ last if $info{stratum} == 0 || $info{stratum} == 1 ||
+ $info{stratum} == 16;
+ last if $info{refid} =~ /^127\.127\.\d{1,3}\.\d{1,3}$/;
+ last if $nb_host == $max_hosts;
+
+ my $next_host = get_next_host($info{peer}, $host);
+ last if $next_host eq '';
+ last if $next_host =~ /^127\.127\.\d{1,3}\.\d{1,3}$/;
+
+ $host = $next_host;
+ }
+ return 0;
+}
+
+sub get_info {
+ my ($host) = @_;
+ my ($rootdelay, $rootdisp, $info) = (0, 0);
+
+ $info = ntp_read_vars(0, [], $host);
+ return if not defined $info;
+ return if not exists $info->{stratum};
+
+ $info->{offset} /= 1000;
+ $info->{syncdistance} = ($info->{rootdisp} + ($info->{rootdelay} / 2)) / 1000;
+
+ return %$info;
+}
+
+
+sub get_next_host {
+ my ($peer, $host) = @_;
+
+ my $info = ntp_read_vars($peer, [qw(srcadr)], $host);
+ return if not defined $info;
+ return $info->{srcadr};
+}
+
+@ntptrace_opts@
+
+1;
+__END__
diff --git a/scripts/ntptrace/ntptrace.man.in b/scripts/ntptrace/ntptrace.man.in
new file mode 100644
index 000000000000..dc13ce06a794
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.man.in
@@ -0,0 +1,114 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntptrace @NTPTRACE_MS@ "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-ryayX3/ag-EyaGW3)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:04 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntptrace-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntptrace\fP
+\- Trace peers of an NTP server
+.SH SYNOPSIS
+\f\*[B-Font]ntptrace\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[host]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\fBntptrace\fP is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+.sp
+If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+.sp
+.br
+.in +4
+.nf
+% ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135
+server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu:
+stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
+.in -4
+.fi
+.sp
+On each line, the fields are (left to right): the host name, the host stratum,
+the time offset between that host and the local host (as measured by
+\fBntptrace\fP; this is why it is not always zero for "localhost"), the host
+synchronization distance, and (only for stratum\-1 servers) the reference clock
+ID. All times are given in seconds. Note that the stratum is the server hop
+count to the primary source, while the synchronization distance is the
+estimated error relative to the primary source. These terms are precisely
+defined in RFC\-1305.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-numeric\f[]
+Print IP addresses instead of hostnames.
+.sp
+Output hosts as dotted-quad numeric format rather than converting to
+the canonical host names.
+.TP
+.NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-max\-hosts\f[]=\f\*[I-Font]number\f[]
+Maximum number of peers to trace.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]number\f[]
+for this option is:
+.ti +4
+ 99
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-r\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-host\f[]=\f\*[I-Font]string\f[]
+Single remote host.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ 127.0.0.1
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBntptrace\fP
+option definitions.
diff --git a/scripts/ntptrace/ntptrace.mdoc.in b/scripts/ntptrace/ntptrace.mdoc.in
new file mode 100644
index 000000000000..975a55c18491
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.mdoc.in
@@ -0,0 +1,91 @@
+.Dd December 19 2014
+.Dt NTPTRACE @NTPTRACE_MS@ User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:09 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntptrace-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntptrace
+.Nd Trace peers of an NTP server
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[host]
+.Pp
+.Sh DESCRIPTION
+\fBntptrace\fP is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+.sp
+If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+.sp
+.Bd -literal -offset indent
+% ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135
+server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu:
+stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
+.Ed
+.sp
+On each line, the fields are (left to right): the host name, the host stratum,
+the time offset between that host and the local host (as measured by
+\fBntptrace\fP; this is why it is not always zero for "localhost"), the host
+synchronization distance, and (only for stratum\-1 servers) the reference clock
+ID. All times are given in seconds. Note that the stratum is the server hop
+count to the primary source, while the synchronization distance is the
+estimated error relative to the primary source. These terms are precisely
+defined in RFC\-1305.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl n , Fl \-numeric
+Print IP addresses instead of hostnames.
+.sp
+Output hosts as dotted\-quad numeric format rather than converting to
+the canonical host names.
+.It Fl m Ar number , Fl \-max\-hosts Ns = Ns Ar number
+Maximum number of peers to trace.
+This option takes an integer number as its argument.
+The default
+.Ar number
+for this option is:
+.ti +4
+ 99
+.sp
+This option has not been fully documented.
+.It Fl r Ar string , Fl \-host Ns = Ns Ar string
+Single remote host.
+The default
+.Ar string
+for this option is:
+.ti +4
+ 127.0.0.1
+.sp
+This option has not been fully documented.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBntptrace\fP
+option definitions.
diff --git a/scripts/ntptrace/ntptrace.texi b/scripts/ntptrace/ntptrace.texi
new file mode 100644
index 000000000000..b1851f2a827b
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.texi
@@ -0,0 +1,40 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename ntptrace.info
+@settitle Ntptrace User's Manual
+@include ../../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{ntptrace},
+a program from the NTP Project
+@end ifinfo
+
+@direntry
+* ntptrace: (ntptrace). Trace the ntp server to the primary time source.
+@end direntry
+
+@titlepage
+@title ntptrace User's Manual
+@subtitle ntptrace, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, ntptrace Description, (dir), (dir)
+@top Simple Network Time Protocol User Manual
+
+This document describes the use of the NTP Project's @code{ntptrace} program.
+This document applies to version @value{VERSION} of @code{ntptrace}.
+
+@shortcontents
+
+@menu
+* ntptrace Description:: Description
+* ntptrace Invocation:: Invoking ntptrace
+@end menu
+
+@include invoke-ntptrace.texi
diff --git a/scripts/ntpver.in b/scripts/ntpver.in
index be36897c46f7..9615e66d61c6 100644
--- a/scripts/ntpver.in
+++ b/scripts/ntpver.in
@@ -1,7 +1,7 @@
-#!@PATH_SH@
+#!@CONFIG_SHELL@
# print version string of NTP daemon
# Copyright (c) 1997 by Ulrich Windl
# Modified 970318: Harlan Stenn: rewritten...
# usage: ntpver hostname
-ntpq -c "rv 0 daemon_version" $* | awk '/daemon_version/ { print $2 }'
+ntpq -c "rv 0 daemon_version" $* | @AWK@ '/daemon_version/ { print $2 }'
diff --git a/scripts/plot_summary-opts b/scripts/plot_summary-opts
new file mode 100644
index 000000000000..a7fd55bf367f
--- /dev/null
+++ b/scripts/plot_summary-opts
@@ -0,0 +1,73 @@
+# EDIT THIS FILE WITH CAUTION (plot_summary-opts)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:45:11 AM by AutoGen 5.18.5pre4
+# From the definitions plot_summary-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'directory' => '/tmp',
+ 'identifier' => '',
+ 'offset-limit' => '0.128',
+ 'peer' => [],
+ 'plot-term' => '',
+ 'output-file' => '',
+ 'dont-wait' => '',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'directory=s', 'identifier=s', 'offset-limit=f',
+ 'peer=s', 'plot-term=s', 'output-file=s',
+ 'dont-wait',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8
+USAGE: plot_summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
+
+ --directory=str Where the summary files are
+ --identifier=str Origin of the data
+ --offset-limit=float Limit of absolute offset
+ --peer=str Peers to generate plots for
+ - may appear multiple times
+ --plot-term=str Gnuplot terminal
+ --output-file=str Output file
+ --dont-wait Don't wait for keystroke between plots
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/plot_summary-opts.def b/scripts/plot_summary-opts.def
new file mode 100644
index 000000000000..61f028bce4e6
--- /dev/null
+++ b/scripts/plot_summary-opts.def
@@ -0,0 +1,83 @@
+/* -*- Mode: Text -*- */
+AutoGen Definitions perlopt;
+
+#include autogen-version.def
+
+prog-name = 'plot_summary';
+prog-title = 'plot statistics generated by summary script';
+package = ntp;
+#include version.def
+
+long-opts;
+gnu-usage;
+
+flag = {
+ name = directory;
+ arg-type = string;
+ arg-default = '/tmp';
+ descrip = 'Where the summary files are';
+ doc = <<- _EndOfDoc_
+ The directory where the @code{plot_summary} will search for the
+ *_summary files generated by @code{summary} script.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = identifier;
+ arg-type = string;
+ descrip = 'Origin of the data';
+ doc = <<- _EndOfDoc_
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+ _EndOfDoc_;
+};
+
+flag = {
+ name = offset-limit;
+ arg-type = string;
+ arg-name = float;
+ arg-default = "0.128";
+ descrip = 'Limit of absolute offset';
+ doc = <<- _EndOfDoc_
+ _EndOfDoc_;
+};
+
+flag = {
+ name = peer;
+ arg-type = string;
+ stack-arg;
+ max = NOLIMIT;
+ descrip = 'Peers to generate plots for';
+ doc = <<- _EndOfDoc_
+ By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = plot-term;
+ arg-type = string;
+ descrip = 'Gnuplot terminal';
+ doc = <<- _EndOfDoc_
+ This is string is passed directly to the @code{gnuplot set terminal}
+ command. Default is @code{x11} if @code{DISPLAY} is set and
+ @code{dumb} is it's not'. See output from @code(gnuplot -e "set
+ terminal") for the list of avalaible options.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = output-file;
+ arg-type = str;
+ descrip = 'Output file';
+ doc = <<- _EndOfDoc_
+ Output file for @code{gnuplot}, default to stdout.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = dont-wait;
+ descrip = "Don't wait for keystroke between plots";
+ doc = <<- _EndOfDoc_
+ _EndOfDoc_;
+};
diff --git a/scripts/plot_summary.1plot_summaryman b/scripts/plot_summary.1plot_summaryman
new file mode 100644
index 000000000000..3fa391531dd1
--- /dev/null
+++ b/scripts/plot_summary.1plot_summaryman
@@ -0,0 +1,114 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH plot_summary 1plot_summaryman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-nJa4Z5/ag-AJaaZ5)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:17 AM by AutoGen 5.18.5pre4
+.\" From the definitions plot_summary-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]plot_summary\fP
+\- plot statistics generated by summary script
+.SH SYNOPSIS
+\f\*[B-Font]plot_summary\fP
+[\f\*[B-Font]\-\-option-name\f[]]
+[\f\*[B-Font]\-\-option-name\f[] \f\*[I-Font]value\f[]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH "DESCRIPTION"
+There is no description for this command.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-\-directory\f[]=\f\*[I-Font]string\f[]
+Where the summary files are.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The directory where the \fBplot_summary\fP will search for the
+ *_summary files generated by \fBsummary\fP script.
+.TP
+.NOP \f\*[B-Font]\-\-identifier\f[]=\f\*[I-Font]string\f[]
+Origin of the data.
+.sp
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+.TP
+.NOP \f\*[B-Font]\-\-offset\-limit\f[]=\f\*[I-Font]float\f[]
+Limit of absolute offset.
+The default
+\f\*[I-Font]float\f[]
+for this option is:
+.ti +4
+ 0.128
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-peer\f[]=\f\*[I-Font]string\f[]
+Peers to generate plots for.
+This option may appear an unlimited number of times.
+.sp
+ By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+.TP
+.NOP \f\*[B-Font]\-\-plot\-term\f[]=\f\*[I-Font]string\f[]
+Gnuplot terminal.
+.sp
+ This is string is passed directly to the \fBgnuplot set terminal\fP
+ command. Default is \fBx11\fP if \fBDISPLAY\fP is set and
+ \fBdumb\fP is it's not'. See output from @code(gnuplot \-e "set
+ terminal") for the list of avalaible options.
+.TP
+.NOP \f\*[B-Font]\-\-output\-file\f[]=\f\*[I-Font]str\f[]
+Output file.
+.sp
+ Output file for \fBgnuplot\fP, default to stdout.
+.TP
+.NOP \f\*[B-Font]\-\-dont\-wait\f[]
+Don't wait for keystroke between plots.
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBplot_summary\fP
+option definitions.
diff --git a/scripts/plot_summary.1plot_summarymdoc b/scripts/plot_summary.1plot_summarymdoc
new file mode 100644
index 000000000000..639786eb6b30
--- /dev/null
+++ b/scripts/plot_summary.1plot_summarymdoc
@@ -0,0 +1,88 @@
+.Dd December 19 2014
+.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:19 AM by AutoGen 5.18.5pre4
+.\" From the definitions plot_summary-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm plot_summary
+.Nd plot statistics generated by summary script
+.Sh SYNOPSIS
+.Nm
+.Op Fl \-option\-name
+.Op Fl \-option\-name Ar value
+.Pp
+All arguments must be options.
+.Pp
+.Sh "DESCRIPTION"
+There is no description for this command.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl \-directory Ns = Ns Ar string
+Where the summary files are.
+The default
+.Ar string
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The directory where the \fBplot_summary\fP will search for the
+ *_summary files generated by \fBsummary\fP script.
+.It Fl \-identifier Ns = Ns Ar string
+Origin of the data.
+.sp
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+.It Fl \-offset\-limit Ns = Ns Ar float
+Limit of absolute offset.
+The default
+.Ar float
+for this option is:
+.ti +4
+ 0.128
+.sp
+.It Fl \-peer Ns = Ns Ar string
+Peers to generate plots for.
+This option may appear an unlimited number of times.
+.sp
+ By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+.It Fl \-plot\-term Ns = Ns Ar string
+Gnuplot terminal.
+.sp
+ This is string is passed directly to the \fBgnuplot set terminal\fP
+ command. Default is \fBx11\fP if \fBDISPLAY\fP is set and
+ \fBdumb\fP is it's not'. See output from @code(gnuplot \-e "set
+ terminal") for the list of avalaible options.
+.It Fl \-output\-file Ns = Ns Ar str
+Output file.
+.sp
+ Output file for \fBgnuplot\fP, default to stdout.
+.It Fl \-dont\-wait
+Don't wait for keystroke between plots.
+.sp
+.It Fl \-help
+Display usage information and exit.
+.It Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBplot_summary\fP
+option definitions.
diff --git a/scripts/plot_summary.html b/scripts/plot_summary.html
new file mode 100644
index 000000000000..ff3e3f197581
--- /dev/null
+++ b/scripts/plot_summary.html
@@ -0,0 +1,207 @@
+<html lang="en">
+<head>
+<title>Plot_summary User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="Plot_summary User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">Plot_summary User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-Description">plot_summary Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">Plot_summary User Manual</h2>
+
+<p>This document describes the use of the NTP Project's <code>plot_summary</code> program.
+This document applies to version 4.2.8 of <code>plot_summary</code>.
+
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">Plot_summary User Manual</a>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#plot_005fsummary-Description">plot_summary Description</a>: Description
+<li><a accesskey="2" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>: Invoking plot_summary
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-Invocation"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-Description">plot_summary Description</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<h3 class="section">Invoking plot_summary</h3>
+
+<p><a name="index-plot_005fsummary-1"></a><a name="index-plot-statistics-generated-by-summary-script-2"></a>
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>plot_summary</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#plot_005fsummary-usage">plot_summary usage</a>: plot_summary help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#plot_005fsummary-directory">plot_summary directory</a>: directory option
+<li><a accesskey="3" href="#plot_005fsummary-identifier">plot_summary identifier</a>: identifier option
+<li><a accesskey="4" href="#plot_005fsummary-peer">plot_summary peer</a>: peer option
+<li><a accesskey="5" href="#plot_005fsummary-plot_002dterm">plot_summary plot-term</a>: plot-term option
+<li><a accesskey="6" href="#plot_005fsummary-output_002dfile">plot_summary output-file</a>: output-file option
+<li><a accesskey="7" href="#plot_005fsummary-exit-status">plot_summary exit status</a>: exit status
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-directory">plot_summary directory</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">plot_summary help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-plot_005fsummary-help-3"></a>
+This is the automatically generated usage text for plot_summary.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.2.8
+USAGE: plot_summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
+
+ --directory=str Where the summary files are
+ --identifier=str Origin of the data
+ --offset-limit=float Limit of absolute offset
+ --peer=str Peers to generate plots for
+ - may appear multiple times
+ --plot-term=str Gnuplot terminal
+ --output-file=str Output file
+ --dont-wait Don't wait for keystroke between plots
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+</pre>
+ <div class="node">
+<p><hr>
+<a name="plot_005fsummary-directory"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-identifier">plot_summary identifier</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-usage">plot_summary usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">directory option</h4>
+
+<p><a name="index-plot_005fsummary_002ddirectory-4"></a>
+This is the &ldquo;where the summary files are&rdquo; option.
+This option takes a string argument.
+ The directory where the <code>plot_summary</code> will search for the
+ *_summary files generated by <code>summary</code> script.
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-identifier"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-peer">plot_summary peer</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-directory">plot_summary directory</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">identifier option</h4>
+
+<p><a name="index-plot_005fsummary_002didentifier-5"></a>
+This is the &ldquo;origin of the data&rdquo; option.
+This option takes a string argument.
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-peer"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-plot_002dterm">plot_summary plot-term</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-identifier">plot_summary identifier</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">peer option</h4>
+
+<p><a name="index-plot_005fsummary_002dpeer-6"></a>
+This is the &ldquo;peers to generate plots for&rdquo; option.
+This option takes a string argument.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>may appear an unlimited number of times.
+</ul>
+
+ <p>By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-plot_002dterm"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-output_002dfile">plot_summary output-file</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-peer">plot_summary peer</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">plot-term option</h4>
+
+<p><a name="index-plot_005fsummary_002dplot_002dterm-7"></a>
+This is the &ldquo;gnuplot terminal&rdquo; option.
+This option takes a string argument.
+ This is string is passed directly to the <code>gnuplot set terminal</code>
+ command. Default is <code>x11</code> if <code>DISPLAY</code> is set and
+ <code>dumb</code> is it's not'. See output from -e "set
+ terminal") for the list of avalaible options.
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-output_002dfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-exit-status">plot_summary exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-plot_002dterm">plot_summary plot-term</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">output-file option</h4>
+
+<p><a name="index-plot_005fsummary_002doutput_002dfile-8"></a>
+This is the &ldquo;output file&rdquo; option.
+This option takes a str argument.
+ Output file for <code>gnuplot</code>, default to stdout.
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-output_002dfile">plot_summary output-file</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">plot_summary exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+
+</body></html>
+
diff --git a/scripts/plot_summary.in b/scripts/plot_summary.in
index 3b46a0401159..3401b0d0b8b8 100644
--- a/scripts/plot_summary.in
+++ b/scripts/plot_summary.in
@@ -19,53 +19,48 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-require 5.003; # "never tested with any other version of Perl"
+package plot_summary;
+use 5.006_000;
use strict;
-
use Time::Local;
-use Getopt::Long;
-# parse command line
-my $summary_dir = "/tmp";
-my $identifier = "host " . `hostname`; # origin of these data
-chomp $identifier; # remove newline
-my $offset_limit = 0.128; # limit of absolute offset
-my $output_file = ""; # output file defaults to stdout
-my $output_file_number = 1; # numbering of output files
-my $gnuplot_terminal = $ENV{DISPLAY} ? "x11" : "dumb";
-my $wait_after_plot = 1;
-my @peer_list = ();
+my ($identifier, $offset_limit, $gnuplot_terminal, $wait_after_plot,
+ $output_file, $output_file_number);
-my %options = ("directory|input-directory=s" => \$summary_dir,
- "identifier=s" => \$identifier,
- "offset-limit=f" => \$offset_limit,
- "output-file=s" => \$output_file,
- "peer=s@" => \@peer_list,
- "plot-term|gnuplot-term=s" => \$gnuplot_terminal,
- "wait-after-plot!" => \$wait_after_plot,
- );
+exit run(@ARGV) unless caller;
-if ( !GetOptions(%options) )
-{
- print STDERR "valid options for $0 are:\n";
- my $opt;
- foreach $opt (sort(keys %options)) {
- print STDERR "\t--$opt\t(default is ";
- if ( ref($options{$opt}) eq "ARRAY" ) {
- print STDERR join(", ", map { "'$_'" } @{$options{$opt}});
- } else {
- print STDERR "'${$options{$opt}}'";
- }
- print STDERR ")\n";
+sub run {
+ my $opts;
+ if (!processOptions(\@_, $opts)) {
+ usage(1);
}
- print STDERR "\n";
- die;
-}
-chomp $identifier;
-die "illegal offset-limit: $offset_limit" unless $offset_limit > 0.0;
-$offset_limit *= 1e6; # scale to microseconds
+ $identifier = $opts->{'identifier'};
+ if (!$identifier) {
+ $identifier = "host".`hostname`;
+ chomp $identifier;
+ }
+ $offset_limit = $opts->{'offset-limit'};
+ $output_file = $opts->{'output-file'};
+ $output_file_number = 1;
+ $gnuplot_terminal = $opts->{'plot-terminal'}
+ || ( $ENV{DISPLAY} ? "x11" : "dumb" );
+ $wait_after_plot = !$opts->{'dont-wait'};
+
+ die "illegal offset-limit: $offset_limit" unless $offset_limit > 0.0;
+ $offset_limit *= 1e6; # scale to microseconds
+
+ my $summary_dir = $opts->{'directory'};
+
+ my $loop_summary ="$summary_dir/loop_summary";
+ my $peer_summary ="$summary_dir/peer_summary";
+ my $clock_summary="$summary_dir/clock_summary";
+
+ my @peer_list = @{$opts->{'peer'}};
+
+ do_loop($loop_summary);
+ do_peer($peer_summary, $_) for @peer_list;
+}
# return the smallest value in the given list
sub min
@@ -176,7 +171,7 @@ sub do_loop
"Daily mean values since $first_day\\n" .
"(Offset limit is $offset_limit microseconds)\"\n";
print "set ylabel \"[us]\"\n";
- print "set data style yerrorbars\n";
+ print "set style data yerrorbars\n";
print "set multiplot\n";
print "set size 1, 0.5\n";
print "set lmargin 8\n";
@@ -224,7 +219,7 @@ sub do_loop
print "set xlabel\n";
print "set ylabel \"[us]\"\n";
print "set origin 0, 0.5\n";
- print "set data style linespoints\n";
+ print "set style data linespoints\n";
print "set multiplot\n";
print "plot $ylimit \"$out_file\" using 1:6 title \"Offset\", ";
print "\"$out_file\" using 1:6 smooth bezier " .
@@ -296,7 +291,7 @@ sub do_peer
print "set origin 0, 0.66\n";
print "set title " .
"\"Peer Summary for $peer on $identifier since $first_day\"\n";
- print "set data style linespoints\n";
+ print "set style data linespoints\n";
print "set ylabel \"[us]\"\n";
print "plot \"$out_file\" using 1:3 title \"mean offset\", ";
print "\"$out_file\" using 1:3 smooth bezier " .
@@ -328,10 +323,7 @@ sub do_peer
unlink $out_file;
}
+@plot_summary_opts@
-my $loop_summary ="$summary_dir/loop_summary";
-my $peer_summary ="$summary_dir/peer_summary";
-my $clock_summary="$summary_dir/clock_summary";
-
-do_loop $loop_summary;
-map { do_peer $peer_summary, $_ } @peer_list;
+1;
+__END__
diff --git a/scripts/plot_summary.man.in b/scripts/plot_summary.man.in
new file mode 100644
index 000000000000..3fa391531dd1
--- /dev/null
+++ b/scripts/plot_summary.man.in
@@ -0,0 +1,114 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH plot_summary 1plot_summaryman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-nJa4Z5/ag-AJaaZ5)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:17 AM by AutoGen 5.18.5pre4
+.\" From the definitions plot_summary-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]plot_summary\fP
+\- plot statistics generated by summary script
+.SH SYNOPSIS
+\f\*[B-Font]plot_summary\fP
+[\f\*[B-Font]\-\-option-name\f[]]
+[\f\*[B-Font]\-\-option-name\f[] \f\*[I-Font]value\f[]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH "DESCRIPTION"
+There is no description for this command.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-\-directory\f[]=\f\*[I-Font]string\f[]
+Where the summary files are.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The directory where the \fBplot_summary\fP will search for the
+ *_summary files generated by \fBsummary\fP script.
+.TP
+.NOP \f\*[B-Font]\-\-identifier\f[]=\f\*[I-Font]string\f[]
+Origin of the data.
+.sp
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+.TP
+.NOP \f\*[B-Font]\-\-offset\-limit\f[]=\f\*[I-Font]float\f[]
+Limit of absolute offset.
+The default
+\f\*[I-Font]float\f[]
+for this option is:
+.ti +4
+ 0.128
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-peer\f[]=\f\*[I-Font]string\f[]
+Peers to generate plots for.
+This option may appear an unlimited number of times.
+.sp
+ By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+.TP
+.NOP \f\*[B-Font]\-\-plot\-term\f[]=\f\*[I-Font]string\f[]
+Gnuplot terminal.
+.sp
+ This is string is passed directly to the \fBgnuplot set terminal\fP
+ command. Default is \fBx11\fP if \fBDISPLAY\fP is set and
+ \fBdumb\fP is it's not'. See output from @code(gnuplot \-e "set
+ terminal") for the list of avalaible options.
+.TP
+.NOP \f\*[B-Font]\-\-output\-file\f[]=\f\*[I-Font]str\f[]
+Output file.
+.sp
+ Output file for \fBgnuplot\fP, default to stdout.
+.TP
+.NOP \f\*[B-Font]\-\-dont\-wait\f[]
+Don't wait for keystroke between plots.
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBplot_summary\fP
+option definitions.
diff --git a/scripts/plot_summary.mdoc.in b/scripts/plot_summary.mdoc.in
new file mode 100644
index 000000000000..639786eb6b30
--- /dev/null
+++ b/scripts/plot_summary.mdoc.in
@@ -0,0 +1,88 @@
+.Dd December 19 2014
+.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:19 AM by AutoGen 5.18.5pre4
+.\" From the definitions plot_summary-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm plot_summary
+.Nd plot statistics generated by summary script
+.Sh SYNOPSIS
+.Nm
+.Op Fl \-option\-name
+.Op Fl \-option\-name Ar value
+.Pp
+All arguments must be options.
+.Pp
+.Sh "DESCRIPTION"
+There is no description for this command.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl \-directory Ns = Ns Ar string
+Where the summary files are.
+The default
+.Ar string
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The directory where the \fBplot_summary\fP will search for the
+ *_summary files generated by \fBsummary\fP script.
+.It Fl \-identifier Ns = Ns Ar string
+Origin of the data.
+.sp
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+.It Fl \-offset\-limit Ns = Ns Ar float
+Limit of absolute offset.
+The default
+.Ar float
+for this option is:
+.ti +4
+ 0.128
+.sp
+.It Fl \-peer Ns = Ns Ar string
+Peers to generate plots for.
+This option may appear an unlimited number of times.
+.sp
+ By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+.It Fl \-plot\-term Ns = Ns Ar string
+Gnuplot terminal.
+.sp
+ This is string is passed directly to the \fBgnuplot set terminal\fP
+ command. Default is \fBx11\fP if \fBDISPLAY\fP is set and
+ \fBdumb\fP is it's not'. See output from @code(gnuplot \-e "set
+ terminal") for the list of avalaible options.
+.It Fl \-output\-file Ns = Ns Ar str
+Output file.
+.sp
+ Output file for \fBgnuplot\fP, default to stdout.
+.It Fl \-dont\-wait
+Don't wait for keystroke between plots.
+.sp
+.It Fl \-help
+Display usage information and exit.
+.It Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBplot_summary\fP
+option definitions.
diff --git a/scripts/plot_summary.texi b/scripts/plot_summary.texi
new file mode 100644
index 000000000000..33fa1fdc8cdd
--- /dev/null
+++ b/scripts/plot_summary.texi
@@ -0,0 +1,40 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename plot_summary.info
+@settitle Plot_summary User's Manual
+@include ../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{plot_summary},
+a program from the NTP Project
+@end ifinfo
+
+@direntry
+* plot_summary: (plot_summary). Summarize (something)
+@end direntry
+
+@titlepage
+@title plot_summary User's Manual
+@subtitle plot_summary, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, plot_summary Description, (dir), (dir)
+@top Plot_summary User Manual
+
+This document describes the use of the NTP Project's @code{plot_summary} program.
+This document applies to version @value{VERSION} of @code{plot_summary}.
+
+@shortcontents
+
+@menu
+* plot_summary Description:: Description
+* plot_summary Invocation:: Invoking plot_summary
+@end menu
+
+@include invoke-plot_summary.texi
diff --git a/scripts/rc/README b/scripts/rc/README
new file mode 100644
index 000000000000..f5b82bcbc679
--- /dev/null
+++ b/scripts/rc/README
@@ -0,0 +1,13 @@
+This directory contains some example rc scripts for ntpd.
+
+In general, ntpd should be started as soon as possible in the boot process. If
+any services require stable system clock, the ntpwait script should be run
+before them as late as possible.
+
+The rc.d contains scripts for systems using rc.d init system (originated in
+NetBSD). If a service requires stable system time, indicate it with TIMESYNC
+dependency and set ntpwait_enable to YES.
+
+For SysV init systems, you'll have to create links as /etc/rc2.d/S20ntpd and
+/etc/rc2.d/S80ntpwait yourself. (The numbers are just examples, try to give
+ntpd as much time as possible to synchronize before running ntpwait).
diff --git a/scripts/rc/ntpd b/scripts/rc/ntpd
new file mode 100644
index 000000000000..9896247e77a0
--- /dev/null
+++ b/scripts/rc/ntpd
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+NTPD=/usr/sbin/ntpd
+PIDFILE=/var/run/ntpd.pid
+USER=ntp
+GROUP=ntp
+NTPD_OPTS="-g -u $USER:$GROUP -p $PIDFILE"
+
+ntpd_start() {
+ if [ -r $PIDFILE ]; then
+ echo "ntpd seems to be already running under pid `cat $PIDFILE`."
+ echo "Delete $PIDFILE if this is not the case.";
+ return 1;
+ fi
+ echo -n "Starting NTP daemon... "
+
+ $NTPD $NTPD_OPTS
+
+ # You can't always rely on the ntpd exit code, see Bug #2420
+ # case "$?" in
+ # 0) echo "OK!"
+ # return 0;;
+ # *) echo "FAILED!"
+ # return 1;;
+ # esac
+
+ sleep 1
+
+ if ps -Ao args|grep -q "^$NTPD $NTPD_OPTS"; then
+ echo "OK!"
+ return 0
+ else
+ echo "FAILED!"
+ [ -e $PIDFILE ] && rm $PIDFILE
+ return 1
+ fi
+}
+
+ntpd_stop() {
+ if [ ! -r $PIDFILE ]; then
+ echo "ntpd doesn't seem to be running, cannot read the pid file."
+ return 1;
+ fi
+ echo -n "Stopping NTP daemon...";
+ PID=`cat $PIDFILE`
+
+ if kill -TERM $PID 2> /dev/null;then
+ # Give ntp 15 seconds to exit
+ for i in `seq 1 15`; do
+ if [ -n "`ps -p $PID|grep -v PID`" ]; then
+ echo -n .
+ sleep 1
+ else
+ echo " OK!"
+ rm $PIDFILE
+ return 0
+ fi
+ done
+ fi
+
+ echo " FAILED! ntpd is still running";
+ return 1
+}
+
+ntpd_status() {
+ if [ -r $PIDFILE ]; then
+ echo "NTP daemon is running as `cat $PIDFILE`"
+ else
+ echo "NTP daemon is not running"
+ fi
+}
+
+case "$1" in
+ 'start')
+ ntpd_start
+ ;;
+ 'stop')
+ ntpd_stop
+ ;;
+ 'restart')
+ ntpd_stop && ntpd_start
+ ;;
+ 'status')
+ ntpd_status
+ ;;
+ *)
+ echo "Usage: $0 (start|stop|restart|status)"
+esac
diff --git a/scripts/rc/ntpwait b/scripts/rc/ntpwait
new file mode 100644
index 000000000000..2542b2add9e6
--- /dev/null
+++ b/scripts/rc/ntpwait
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+NTPWAIT=/usr/sbin/ntpwait
+
+ntpwait_start() {
+ $NTPWAIT -v
+}
+
+case "$1" in
+ 'start')
+ ntpwait_start
+ ;;
+ *)
+ echo "Usage: $0 (start)"
+esac
diff --git a/scripts/rc/rc.d/TIMESYNC b/scripts/rc/rc.d/TIMESYNC
new file mode 100644
index 000000000000..a8c074fd4865
--- /dev/null
+++ b/scripts/rc/rc.d/TIMESYNC
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# PROVIDE: TIMESYNC
+# REQUIRE: LOGIN ntpwait
+
+# This depedency ensures that all services which require stable system clock
+# are run after ntpd is synchronized. It's run as late as possible, if you need
+# stable clock before login use BEFORE: LOGIN
diff --git a/scripts/rc/rc.d/ntpd b/scripts/rc/rc.d/ntpd
new file mode 100644
index 000000000000..ea33458bc9b7
--- /dev/null
+++ b/scripts/rc/rc.d/ntpd
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# PROVIDE: ntpd
+# REQUIRE: syslogd cleanvar devfs
+# BEFORE: SERVERS
+
+. /etc/rc.subr
+
+name="ntpd"
+rcvar="ntpd_enable"
+command="/usr/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+start_precmd="ntpd_precmd"
+
+load_rc_config $name
+
+ntpd_precmd()
+{
+ rc_flags="-c ${ntpd_config} ${ntpd_flags}"
+
+ if checkyesno ntpd_sync_on_start; then
+ rc_flags="-g $rc_flags"
+ fi
+
+ if [ -z "$ntpd_chrootdir" ]; then
+ return 0;
+ fi
+
+ rc_flags="-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags"
+}
+
+run_rc_command "$1"
diff --git a/scripts/rc/rc.d/ntpwait b/scripts/rc/rc.d/ntpwait
new file mode 100644
index 000000000000..891d0dbd6cb6
--- /dev/null
+++ b/scripts/rc/rc.d/ntpwait
@@ -0,0 +1,21 @@
+#!/bin/sh
+# This script, when run, runs ntp-wait if ntpd is enabled.
+
+# PROVIDE: ntpwait
+
+. /etc/rc.subr
+
+name="ntpwait"
+rcvar="ntpwait_enable"
+start_cmd="ntpwait_start"
+ntp_wait="/usr/sbin/ntp-wait"
+
+load_rc_config "$name"
+
+ntpwait_start() {
+ if checkyesno ntpd_enable; then
+ $ntp_wait -v
+ fi
+}
+
+run_rc_command "$1"
diff --git a/scripts/rc1/postinstall b/scripts/rc1/postinstall
deleted file mode 100644
index d84b8c517211..000000000000
--- a/scripts/rc1/postinstall
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-/etc/init.d/xntp start
diff --git a/scripts/rc1/preinstall b/scripts/rc1/preinstall
deleted file mode 100644
index aa18639c2fe6..000000000000
--- a/scripts/rc1/preinstall
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-if [ -x /etc/init.d/xntp ]
-then
- /etc/init.d/xntp stop
-fi
-exit 0
diff --git a/scripts/rc1/preremove b/scripts/rc1/preremove
deleted file mode 100644
index b870151a27b4..000000000000
--- a/scripts/rc1/preremove
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-/etc/init.d/xntp stop
-
-exit 0
diff --git a/scripts/rc1/prototype b/scripts/rc1/prototype
deleted file mode 100644
index 3de20b076b8c..000000000000
--- a/scripts/rc1/prototype
+++ /dev/null
@@ -1,19 +0,0 @@
-!default 755 root bin
-i pkginfo
-i preinstall
-i postinstall
-i preremove
-f none /etc/init.d/xntp=xntp 0755 root other
-l none /etc/rc2.d/S79xntp=/etc/init.d/xntp
-l none /etc/rc1.d/K79xntp=/etc/init.d/xntp
-l none /etc/rc0.d/K79xntp=/etc/init.d/xntp
-f none /usr/sbin/xntpd=xntpd/xntpd 0555 root other
-f none /usr/sbin/xntpdc=xntpdc/xntpdc 0555 root other
-f none /usr/sbin/ntpq=ntpq/ntpq 0555 root other
-f none /usr/sbin/ntptrace=ntptrace/ntptrace 0555 root other
-f none /usr/sbin/ntpdate=ntpdate/ntpdate 0555 root other
-f none /usr/share/man/man1m/xntpd.1m=doc/xntpd.8 0444 root other
-f none /usr/share/man/man1m/xntpdc.1m=doc/xntpdc.8 0444 root other
-f none /usr/share/man/man1m/ntpdate.1m=doc/ntpdate.8 0444 root other
-f none /usr/share/man/man1m/ntpq.1m=doc/ntpq.8 0444 root other
-f none /usr/share/man/man1m/ntptrace.1m=doc/ntptrace.8 0444 root other
diff --git a/scripts/rc1/xntp b/scripts/rc1/xntp
deleted file mode 100644
index 227b943aaa2e..000000000000
--- a/scripts/rc1/xntp
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-killproc() { # kill named processes
- pid=`/usr/bin/ps -e |
- /usr/bin/grep $1 |
- /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
- [ "$pid" != "" ] && kill $pid
-}
-
-case "$1" in
-'start')
- ps -e | grep xntpd > /dev/null 2>&1
- if [ $? -eq 0 ]
- then
- echo "ntp daemon already running. ntp start aborted"
- exit 0
- fi
- if [ -f /etc/inet/ntp.conf -a -x /usr/sbin/xntpd ]
- then
- /usr/sbin/xntpd -c /etc/inet/ntp.conf
- fi
- ;;
-'stop')
- killproc xntpd
- ;;
-*)
- echo "Usage: /etc/init.d/xntp { start | stop }"
- ;;
-esac
diff --git a/scripts/rc2/local.ntpd b/scripts/rc2/local.ntpd
deleted file mode 100644
index ba53e05adbbb..000000000000
--- a/scripts/rc2/local.ntpd
+++ /dev/null
@@ -1,64 +0,0 @@
-#! /usr/bin/perl -w
-# 980904 Harlan Stenn - created
-
-# vvv CHANGE THESE vvv
-
-$ps = "/bin/ps x |";
-
-$ntp_conf = "/etc/ntp.conf";
-$ntpd = "/usr/local/bin/xntpd";
-$ntpdate = "/usr/local/bin/ntpdate -b -s 10.0.0.1 10.0.0.2";
-
-# ^^^ CHANGE THESE ^^^
-
-{
- if (0)
- {
- }
- elsif ($ARGV[0] eq "start")
- {
- @pidlist = pidlist($ntpd);
- if (defined(@pidlist))
- {
- warn "NTP is already running\n";
- }
- else
- {
- if ( -f $ntp_conf && -x $ntpd )
- {
- system ($ntpdate);
- system ($ntpd." -c ".$ntp_conf);
- }
- }
- }
- elsif ($ARGV[0] eq "stop")
- {
- @pidlist = pidlist($ntpd);
- kill 'TERM', @pidlist if (scalar(@pidlist) > 0);
- }
- else
- {
- die "Usage: $0 {start,stop}\n";
- }
-}
-
-sub pidlist ($)
- {
- my ($target) = @_;
- my ($qt) = quotemeta($target);
- my @pids;
-
- open(PS, $ps) || die "Can't run ps: $!\n";
- while (<PS>)
- {
- chomp;
- next unless (/$qt/);
- print "Got <$_>\n";
- if (/^\s*(\d+)\s+/)
- {
- push @pids, $1;
- }
- }
- close(PS);
- return @pids;
- }
diff --git a/scripts/summary-opts b/scripts/summary-opts
new file mode 100644
index 000000000000..edd3b3945087
--- /dev/null
+++ b/scripts/summary-opts
@@ -0,0 +1,69 @@
+# EDIT THIS FILE WITH CAUTION (summary-opts)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:45:13 AM by AutoGen 5.18.5pre4
+# From the definitions summary-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'directory' => '/var/log/ntp',
+ 'end-date' => '',
+ 'output-directory' => '/tmp',
+ 'peer-dist-limit' => '400',
+ 'skip-time-steps' => '3600',
+ 'start-date' => '19700101',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'directory=s', 'end-date=i', 'output-directory=s',
+ 'peer-dist-limit=f', 'skip-time-steps=f', 'start-date=i',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+summary - compute various stastics from NTP stat files - Ver. 4.2.8
+USAGE: summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
+
+ --directory=str Directory containing stat files
+ --end-date=num End date
+ --output-directory=str Output directory
+ --peer-dist-limit=float Peer dist limit
+ --skip-time-steps=float Ignore time offsets larger that this
+ --start-date=num Start date
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/summary-opts.def b/scripts/summary-opts.def
new file mode 100644
index 000000000000..82c31eb24817
--- /dev/null
+++ b/scripts/summary-opts.def
@@ -0,0 +1,82 @@
+/* -*- Mode: Text -*- */
+AutoGen Definitions perlopt;
+
+#include autogen-version.def
+
+prog-name = 'summary';
+prog-title = 'compute various stastics from NTP stat files';
+package = ntp;
+#include version.def
+
+long-opts;
+gnu-usage;
+
+flag = {
+ name = directory;
+ arg-type = string;
+ arg-default = '/var/log/ntp';
+ descrip = 'Directory containing stat files';
+ doc = <<- _EndOfDoc_
+ The directory where @code{ntpd} will search for .stat files generated
+ by @code{ntpd}.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = end-date;
+ arg-type = number;
+ descrip = 'End date';
+ doc = <<- _EndOfDoc_
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use @code{date -u +%Y%m%d})
+ to get the timestamp.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = output-directory;
+ arg-type = str;
+ arg-default = '/tmp';
+ descrip = 'Output directory';
+ doc = <<- _EndOfDoc_
+ The output directory @code{summary} will write all output files to.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = peer-dist-limit;
+ arg-type = string;
+ arg-name = float;
+ arg-default = 400;
+ descrip = 'Peer dist limit';
+ doc = <<- _EndOfDoc_
+ _EndOfDoc_;
+};
+
+flag = {
+ name = skip-time-steps;
+ arg-type = string;
+ arg-name = float;
+ arg-default = 3600;
+ descrip = 'Ignore time offsets larger that this';
+ doc = <<- _EndOfDoc_
+ _EndOfDoc_;
+};
+
+flag = {
+ name = start-date;
+ arg-type = num;
+ arg-default = 19700101;
+ descrip = 'Start date';
+ doc = <<- _EndOfDoc_
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+ _EndOfDoc_;
+};
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'texi';
+ ds-text = <<- _EndOfDoc
+ _EndOfDoc;
+};
diff --git a/scripts/summary.1summaryman b/scripts/summary.1summaryman
new file mode 100644
index 000000000000..36680b8cc5ce
--- /dev/null
+++ b/scripts/summary.1summaryman
@@ -0,0 +1,123 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH summary 1summaryman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-A3aGb6/ag-M3aOa6)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:22 AM by AutoGen 5.18.5pre4
+.\" From the definitions summary-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]summary\fP
+\- compute various stastics from NTP stat files
+.SH SYNOPSIS
+\f\*[B-Font]summary\fP
+[\f\*[B-Font]\-\-option-name\f[]]
+[\f\*[B-Font]\-\-option-name\f[] \f\*[I-Font]value\f[]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+.sp
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-\-directory\f[]=\f\*[I-Font]string\f[]
+Directory containing stat files.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ /var/log/ntp
+.sp
+ The directory where \fBntpd\fP will search for .stat files generated
+ by \fBntpd\fP.
+.TP
+.NOP \f\*[B-Font]\-\-end\-date\f[]=\f\*[I-Font]number\f[]
+End date.
+This option takes an integer number as its argument.
+.sp
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use \fBdate \-u +%Y%m%d\fP)
+ to get the timestamp.
+.TP
+.NOP \f\*[B-Font]\-\-output\-directory\f[]=\f\*[I-Font]str\f[]
+Output directory.
+The default
+\f\*[I-Font]str\f[]
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The output directory \fBsummary\fP will write all output files to.
+.TP
+.NOP \f\*[B-Font]\-\-peer\-dist\-limit\f[]=\f\*[I-Font]float\f[]
+Peer dist limit.
+The default
+\f\*[I-Font]float\f[]
+for this option is:
+.ti +4
+ 400
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-skip\-time\-steps\f[]=\f\*[I-Font]float\f[]
+Ignore time offsets larger that this.
+The default
+\f\*[I-Font]float\f[]
+for this option is:
+.ti +4
+ 3600
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-start\-date\f[]=\f\*[I-Font]num\f[]
+Start date.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]num\f[]
+for this option is:
+.ti +4
+ 19700101
+.sp
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+.TP
+.NOP \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBsummary\fP
+option definitions.
diff --git a/scripts/summary.1summarymdoc b/scripts/summary.1summarymdoc
new file mode 100644
index 000000000000..603eea825fdc
--- /dev/null
+++ b/scripts/summary.1summarymdoc
@@ -0,0 +1,98 @@
+.Dd December 19 2014
+.Dt SUMMARY 1summarymdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:24 AM by AutoGen 5.18.5pre4
+.\" From the definitions summary-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm summary
+.Nd compute various stastics from NTP stat files
+.Sh SYNOPSIS
+.Nm
+.Op Fl \-option\-name
+.Op Fl \-option\-name Ar value
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.sp
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl \-directory Ns = Ns Ar string
+Directory containing stat files.
+The default
+.Ar string
+for this option is:
+.ti +4
+ /var/log/ntp
+.sp
+ The directory where \fBntpd\fP will search for .stat files generated
+ by \fBntpd\fP.
+.It Fl \-end\-date Ns = Ns Ar number
+End date.
+This option takes an integer number as its argument.
+.sp
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use \fBdate \-u +%Y%m%d\fP)
+ to get the timestamp.
+.It Fl \-output\-directory Ns = Ns Ar str
+Output directory.
+The default
+.Ar str
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The output directory \fBsummary\fP will write all output files to.
+.It Fl \-peer\-dist\-limit Ns = Ns Ar float
+Peer dist limit.
+The default
+.Ar float
+for this option is:
+.ti +4
+ 400
+.sp
+.It Fl \-skip\-time\-steps Ns = Ns Ar float
+Ignore time offsets larger that this.
+The default
+.Ar float
+for this option is:
+.ti +4
+ 3600
+.sp
+.It Fl \-start\-date Ns = Ns Ar num
+Start date.
+This option takes an integer number as its argument.
+The default
+.Ar num
+for this option is:
+.ti +4
+ 19700101
+.sp
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+.It Fl \-help
+Display usage information and exit.
+.It Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBsummary\fP
+option definitions.
diff --git a/scripts/summary.html b/scripts/summary.html
new file mode 100644
index 000000000000..269e903fd3f6
--- /dev/null
+++ b/scripts/summary.html
@@ -0,0 +1,182 @@
+<html lang="en">
+<head>
+<title>Summary User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="Summary User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">Summary User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#summary-Description">summary Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">Summary User Manual</h2>
+
+<p>This document describes the use of the NTP Project's <code>summary</code> program.
+This document applies to version 4.2.8 of <code>summary</code>.
+
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">Summary User Manual</a>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#summary-Description">summary Description</a>: Description
+<li><a accesskey="2" href="#summary-Invocation">summary Invocation</a>: Invoking summary
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="summary-Invocation"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#summary-Description">summary Description</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<h3 class="section">Invoking summary</h3>
+
+<p><a name="index-summary-1"></a><a name="index-compute-various-stastics-from-NTP-stat-files-2"></a>
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>summary</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#summary-usage">summary usage</a>: summary help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#summary-directory">summary directory</a>: directory option
+<li><a accesskey="3" href="#summary-end_002ddate">summary end-date</a>: end-date option
+<li><a accesskey="4" href="#summary-output_002ddirectory">summary output-directory</a>: output-directory option
+<li><a accesskey="5" href="#summary-start_002ddate">summary start-date</a>: start-date option
+<li><a accesskey="6" href="#summary-exit-status">summary exit status</a>: exit status
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="summary-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#summary-directory">summary directory</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#summary-Invocation">summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">summary help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-summary-help-3"></a>
+This is the automatically generated usage text for summary.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">summary - compute various stastics from NTP stat files - Ver. 4.2.8
+USAGE: summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
+
+ --directory=str Directory containing stat files
+ --end-date=num End date
+ --output-directory=str Output directory
+ --peer-dist-limit=float Peer dist limit
+ --skip-time-steps=float Ignore time offsets larger that this
+ --start-date=num Start date
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+</pre>
+ <div class="node">
+<p><hr>
+<a name="summary-directory"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#summary-end_002ddate">summary end-date</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#summary-usage">summary usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#summary-Invocation">summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">directory option</h4>
+
+<p><a name="index-summary_002ddirectory-4"></a>
+This is the &ldquo;directory containing stat files&rdquo; option.
+This option takes a string argument.
+ The directory where <code>ntpd</code> will search for .stat files generated
+ by <code>ntpd</code>.
+<div class="node">
+<p><hr>
+<a name="summary-end_002ddate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#summary-output_002ddirectory">summary output-directory</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#summary-directory">summary directory</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#summary-Invocation">summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">end-date option</h4>
+
+<p><a name="index-summary_002dend_002ddate-5"></a>
+This is the &ldquo;end date&rdquo; option.
+This option takes a number argument.
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use <code>date -u +%Y%m%d</code>)
+ to get the timestamp.
+<div class="node">
+<p><hr>
+<a name="summary-output_002ddirectory"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#summary-start_002ddate">summary start-date</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#summary-end_002ddate">summary end-date</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#summary-Invocation">summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">output-directory option</h4>
+
+<p><a name="index-summary_002doutput_002ddirectory-6"></a>
+This is the &ldquo;output directory&rdquo; option.
+This option takes a str argument.
+ The output directory <code>summary</code> will write all output files to.
+<div class="node">
+<p><hr>
+<a name="summary-start_002ddate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#summary-exit-status">summary exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#summary-output_002ddirectory">summary output-directory</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#summary-Invocation">summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">start-date option</h4>
+
+<p><a name="index-summary_002dstart_002ddate-7"></a>
+This is the &ldquo;start date&rdquo; option.
+This option takes a num argument.
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+<div class="node">
+<p><hr>
+<a name="summary-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#summary-start_002ddate">summary start-date</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#summary-Invocation">summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">summary exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+
+</body></html>
+
diff --git a/scripts/summary.in b/scripts/summary.in
index 515dfc6b56f7..a99f8df0e73e 100644
--- a/scripts/summary.in
+++ b/scripts/summary.in
@@ -18,55 +18,90 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-require 5.003; # "never tested with any other version of Perl"
+package summary;
+use 5.006_000;
use strict;
-use Getopt::Long;
+my ($log_date_pattern, $statsdir, $outputdir, $skip_time_steps, $startdate,
+ $enddate, $peer_dist_limit);
-my $log_date_pattern = '[12]\d{3}[01]\d[0-3]\d';
-my $statsdir = "/var/log/ntp"; # directory with input files
-my $outputdir = "/tmp"; # directory for output files
-my $skip_time_steps = 3600.0; # ignore time offsets larger that this
-my $startdate = "19700101"; # first data file to use (YYYYMMDD)
-my $enddate=`date -u +%Y%m%d`; chomp $enddate; --$enddate;
-my $peer_dist_limit = 400.0;
+exit run(@ARGV) unless caller;
-my %options = ("directory|input-directory=s" => \$statsdir,
- "output-directory=s" => \$outputdir,
- "skip-time-steps:f" => \$skip_time_steps,
- "start-date=s" => \$startdate,
- "end-date=s" => \$enddate,
- "peer-dist-limit=f" => \$peer_dist_limit);
+sub run {
+ my $opts;
+ if (!processOptions(\@ARGV, $opts)) {
+ usage(1);
+ };
-if ( !GetOptions(%options) )
-{
- print STDERR "valid options for $0 are:\n";
- my $opt;
- foreach $opt (sort(keys %options)) {
- print STDERR "\t--$opt\t(default is ";
- if ( ref($options{$opt}) eq "ARRAY" ) {
- print STDERR join(", ", map { "'$_'" } @{$options{$opt}});
- } else {
- print STDERR "'${$options{$opt}}'";
- }
- print STDERR ")\n";
+ $log_date_pattern = '[12]\d{3}[01]\d[0-3]\d';
+ $statsdir = $opts->{directory};
+ $outputdir = $opts->{'output-directory'};
+ $skip_time_steps = $opts->{'skip-time-steps'};
+ $startdate = $opts->{'start-date'};
+ $enddate = $opts->{'end-date'};
+ if (!$enddate){
+ $enddate = `date -u +%Y%m%d`;
+ chomp $enddate;
+ --$enddate;
}
- print STDERR "\n";
- die;
-}
+ $peer_dist_limit = $opts->{'peer-dist-limit'};
+
+ # check possibly current values of options
+ die "$statsdir: no such directory" unless (-d $statsdir);
+ die "$outputdir: no such directory" unless (-d $outputdir);
+ die "$skip_time_steps: skip-time-steps must be positive"
+ unless ($skip_time_steps >= 0.0);
+ die "$startdate: invalid start date|$`|$&|$'"
+ unless ($startdate =~ m/.*$log_date_pattern$/);
+ die "$enddate: invalid end date"
+ unless ($enddate =~ m/.*$log_date_pattern$/);
+
+ $skip_time_steps = 0.128 if ($skip_time_steps == 0);
+
+ my $loop_summary="$outputdir/loop_summary";
+ my $peer_summary="$outputdir/peer_summary";
+ my $clock_summary="$outputdir/clock_summary";
+ my (@loopfiles, @peerfiles, @clockfiles);
-# check possibly current values of options
-die "$statsdir: no such directory" unless (-d $statsdir);
-die "$outputdir: no such directory" unless (-d $outputdir);
-die "$skip_time_steps: skip-time-steps must be positive"
- unless ($skip_time_steps >= 0.0);
-die "$startdate: invalid start date|$`|$&|$'"
- unless ($startdate =~ m/.*$log_date_pattern$/);
-die "$enddate: invalid end date"
- unless ($enddate =~ m/.*$log_date_pattern$/);
+ print STDERR "Creating summaries from $statsdir ($startdate to $enddate)\n";
-$skip_time_steps = 0.128 if ($skip_time_steps == 0);
+ opendir SDIR, $statsdir or die "directory ${statsdir}: $!";
+ rewinddir SDIR;
+ @loopfiles=sort grep /loop.*$log_date_pattern/, readdir SDIR;
+ rewinddir SDIR;
+ @peerfiles=sort grep /peer.*$log_date_pattern/, readdir SDIR;
+ rewinddir SDIR;
+ @clockfiles=sort grep /clock.*$log_date_pattern/, readdir SDIR;
+ closedir SDIR;
+
+ # remove old summary files
+ for ($loop_summary, $peer_summary, $clock_summary) { unlink $_ if -f $_ };
+
+ my $date;
+ for (@loopfiles) {
+ $date = $_; $date =~ s/.*($log_date_pattern)$/$1/;
+ if ($date ge $startdate && $date le $enddate) {
+ do_loop($statsdir, $_, $loop_summary);
+ }
+ }
+
+ for (@peerfiles) {
+ $date = $_; $date =~ s/.*($log_date_pattern)$/$1/;
+ if ($date ge $startdate && $date le $enddate) {
+ do_peer($statsdir, $_, $peer_summary);
+ }
+ }
+
+ for (@clockfiles) {
+ $date = $_; $date =~ s/.*($log_date_pattern)$/$1/;
+ if ($date ge $startdate && $date le $enddate) {
+ do_clock($statsdir, $_, $clock_summary);
+ }
+ }
+
+ print STDERR "Creating peer summary with limit $peer_dist_limit\n";
+ peer_summary($peer_summary) if (-f $peer_summary);
+}
sub min
{
@@ -328,46 +363,7 @@ sub peer_summary
print sort @lines;
}
-my $loop_summary="$outputdir/loop_summary";
-my $peer_summary="$outputdir/peer_summary";
-my $clock_summary="$outputdir/clock_summary";
-my (@loopfiles, @peerfiles, @clockfiles);
-
-print STDERR "Creating summaries from $statsdir ($startdate to $enddate)\n";
-
-opendir SDIR, $statsdir or die "directory ${statsdir}: $!";
-rewinddir SDIR;
-@loopfiles=sort grep /loop.*$log_date_pattern/, readdir SDIR;
-rewinddir SDIR;
-@peerfiles=sort grep /peer.*$log_date_pattern/, readdir SDIR;
-rewinddir SDIR;
-@clockfiles=sort grep /clock.*$log_date_pattern/, readdir SDIR;
-closedir SDIR;
-
-# remove old summary files
-map { unlink $_ if -f $_ } ($loop_summary, $peer_summary, $clock_summary);
-
-my $date;
-map {
- $date = $_; $date =~ s/.*($log_date_pattern)$/$1/;
- if ($date ge $startdate && $date le $enddate) {
- do_loop $statsdir, $_, $loop_summary;
- }
-} @loopfiles;
-
-map {
- $date = $_; $date =~ s/.*($log_date_pattern)$/$1/;
- if ($date ge $startdate && $date le $enddate) {
- do_peer $statsdir, $_, $peer_summary;
- }
-} @peerfiles;
-
-map {
- $date = $_; $date =~ s/.*($log_date_pattern)$/$1/;
- if ($date ge $startdate && $date le $enddate) {
- do_clock $statsdir, $_, $clock_summary;
- }
-} @clockfiles;
+@summary_opts@
-print STDERR "Creating peer summary with limit $peer_dist_limit\n";
-peer_summary $peer_summary if (-f $peer_summary);
+1;
+__END__
diff --git a/scripts/summary.man.in b/scripts/summary.man.in
new file mode 100644
index 000000000000..36680b8cc5ce
--- /dev/null
+++ b/scripts/summary.man.in
@@ -0,0 +1,123 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH summary 1summaryman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-A3aGb6/ag-M3aOa6)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:22 AM by AutoGen 5.18.5pre4
+.\" From the definitions summary-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]summary\fP
+\- compute various stastics from NTP stat files
+.SH SYNOPSIS
+\f\*[B-Font]summary\fP
+[\f\*[B-Font]\-\-option-name\f[]]
+[\f\*[B-Font]\-\-option-name\f[] \f\*[I-Font]value\f[]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+.sp
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-\-directory\f[]=\f\*[I-Font]string\f[]
+Directory containing stat files.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ /var/log/ntp
+.sp
+ The directory where \fBntpd\fP will search for .stat files generated
+ by \fBntpd\fP.
+.TP
+.NOP \f\*[B-Font]\-\-end\-date\f[]=\f\*[I-Font]number\f[]
+End date.
+This option takes an integer number as its argument.
+.sp
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use \fBdate \-u +%Y%m%d\fP)
+ to get the timestamp.
+.TP
+.NOP \f\*[B-Font]\-\-output\-directory\f[]=\f\*[I-Font]str\f[]
+Output directory.
+The default
+\f\*[I-Font]str\f[]
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The output directory \fBsummary\fP will write all output files to.
+.TP
+.NOP \f\*[B-Font]\-\-peer\-dist\-limit\f[]=\f\*[I-Font]float\f[]
+Peer dist limit.
+The default
+\f\*[I-Font]float\f[]
+for this option is:
+.ti +4
+ 400
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-skip\-time\-steps\f[]=\f\*[I-Font]float\f[]
+Ignore time offsets larger that this.
+The default
+\f\*[I-Font]float\f[]
+for this option is:
+.ti +4
+ 3600
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-start\-date\f[]=\f\*[I-Font]num\f[]
+Start date.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]num\f[]
+for this option is:
+.ti +4
+ 19700101
+.sp
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+.TP
+.NOP \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBsummary\fP
+option definitions.
diff --git a/scripts/summary.mdoc.in b/scripts/summary.mdoc.in
new file mode 100644
index 000000000000..603eea825fdc
--- /dev/null
+++ b/scripts/summary.mdoc.in
@@ -0,0 +1,98 @@
+.Dd December 19 2014
+.Dt SUMMARY 1summarymdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:24 AM by AutoGen 5.18.5pre4
+.\" From the definitions summary-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm summary
+.Nd compute various stastics from NTP stat files
+.Sh SYNOPSIS
+.Nm
+.Op Fl \-option\-name
+.Op Fl \-option\-name Ar value
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.sp
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl \-directory Ns = Ns Ar string
+Directory containing stat files.
+The default
+.Ar string
+for this option is:
+.ti +4
+ /var/log/ntp
+.sp
+ The directory where \fBntpd\fP will search for .stat files generated
+ by \fBntpd\fP.
+.It Fl \-end\-date Ns = Ns Ar number
+End date.
+This option takes an integer number as its argument.
+.sp
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use \fBdate \-u +%Y%m%d\fP)
+ to get the timestamp.
+.It Fl \-output\-directory Ns = Ns Ar str
+Output directory.
+The default
+.Ar str
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The output directory \fBsummary\fP will write all output files to.
+.It Fl \-peer\-dist\-limit Ns = Ns Ar float
+Peer dist limit.
+The default
+.Ar float
+for this option is:
+.ti +4
+ 400
+.sp
+.It Fl \-skip\-time\-steps Ns = Ns Ar float
+Ignore time offsets larger that this.
+The default
+.Ar float
+for this option is:
+.ti +4
+ 3600
+.sp
+.It Fl \-start\-date Ns = Ns Ar num
+Start date.
+This option takes an integer number as its argument.
+The default
+.Ar num
+for this option is:
+.ti +4
+ 19700101
+.sp
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+.It Fl \-help
+Display usage information and exit.
+.It Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBsummary\fP
+option definitions.
diff --git a/scripts/summary.texi b/scripts/summary.texi
new file mode 100644
index 000000000000..5f1548ac4fdc
--- /dev/null
+++ b/scripts/summary.texi
@@ -0,0 +1,40 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename summary.info
+@settitle Summary User's Manual
+@include ../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{summary},
+a program from the NTP Project
+@end ifinfo
+
+@direntry
+* summary: (summary). Summarize (something)
+@end direntry
+
+@titlepage
+@title summary User's Manual
+@subtitle summary, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, summary Description, (dir), (dir)
+@top Summary User Manual
+
+This document describes the use of the NTP Project's @code{summary} program.
+This document applies to version @value{VERSION} of @code{summary}.
+
+@shortcontents
+
+@menu
+* summary Description:: Description
+* summary Invocation:: Invoking summary
+@end menu
+
+@include invoke-summary.texi