diff options
author | gjb <gjb@FreeBSD.org> | 2015-05-06 11:50:30 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2015-05-06 11:50:30 +0000 |
commit | e9b794a6dfdf28ce835f5730e5884b97bc62aa19 (patch) | |
tree | 759e7355bf352e43e4a156a773a28d3d9fdbcad7 /contrib/ntp/scripts/update-leap | |
parent | 55e5b36d38ff95ded004ed97fe9ed303abb36184 (diff) | |
parent | 462d48d659bae28be32c0d488ddeeaaf99d87bae (diff) | |
download | FreeBSD-src-e9b794a6dfdf28ce835f5730e5884b97bc62aa19.zip FreeBSD-src-e9b794a6dfdf28ce835f5730e5884b97bc62aa19.tar.gz |
MFH: r282315-r282534
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'contrib/ntp/scripts/update-leap')
-rw-r--r-- | contrib/ntp/scripts/update-leap/Makefile.am | 97 | ||||
-rw-r--r-- | contrib/ntp/scripts/update-leap/Makefile.in | 887 | ||||
-rw-r--r-- | contrib/ntp/scripts/update-leap/invoke-update-leap.menu | 1 | ||||
-rw-r--r-- | contrib/ntp/scripts/update-leap/invoke-update-leap.texi | 170 | ||||
-rw-r--r-- | contrib/ntp/scripts/update-leap/update-leap | 434 | ||||
-rw-r--r-- | contrib/ntp/scripts/update-leap/update-leap-opts | 72 | ||||
-rw-r--r-- | contrib/ntp/scripts/update-leap/update-leap-opts.def | 163 | ||||
-rw-r--r-- | contrib/ntp/scripts/update-leap/update-leap.1update-leapman | 169 | ||||
-rw-r--r-- | contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc | 134 | ||||
-rw-r--r-- | contrib/ntp/scripts/update-leap/update-leap.html | 274 | ||||
-rw-r--r-- | contrib/ntp/scripts/update-leap/update-leap.man.in | 169 | ||||
-rw-r--r-- | contrib/ntp/scripts/update-leap/update-leap.mdoc.in | 134 | ||||
-rw-r--r-- | contrib/ntp/scripts/update-leap/update-leap.texi | 43 |
13 files changed, 2747 insertions, 0 deletions
diff --git a/contrib/ntp/scripts/update-leap/Makefile.am b/contrib/ntp/scripts/update-leap/Makefile.am new file mode 100644 index 0000000..1638102 --- /dev/null +++ b/contrib/ntp/scripts/update-leap/Makefile.am @@ -0,0 +1,97 @@ +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= $(UPDATE_LEAP_DB) +sbin_SCRIPTS= $(UPDATE_LEAP_DS) +libexec_SCRIPTS= $(UPDATE_LEAP_DL) +noinst_SCRIPTS= $(UPDATE_LEAP_NI) +EXTRA_SCRIPTS= update-leap + +man1_MANS= +man8_MANS= +if INSTALL_UPDATE_LEAP +man_MANS= update-leap.$(UPDATE_LEAP_MS) +else +noinst_MANS= update-leap.$(UPDATE_LEAP_MS) +endif + +EXTRA_DIST = \ + invoke-update-leap.menu \ + invoke-update-leap.texi \ + update-leap \ + update-leap-opts.def \ + update-leap-opts \ + update-leap.1update-leapman \ + update-leap.1update-leapmdoc \ + update-leap.man.in \ + update-leap.mdoc.in \ + update-leap.texi \ + update-leap.html \ + $(NULL) + +html_DATA = update-leap.html + +#CLEANFILES = update-leap.1 +DISTCLEANFILES = config.log $(man_MANS) $(noinst_MANS) + +noinst_DATA = \ + invoke-update-leap.menu \ + invoke-update-leap.texi \ + update-leap.man.in \ + update-leap.mdoc.in \ + update-leap-opts \ + $(NULL) + +$(srcdir)/update-leap: $(srcdir)/update-leap-opts + @: do-nothing action to avoid default SCCS get + +$(srcdir)/update-leap-opts: update-leap-opts.def $(std_def_list) + $(run_ag) update-leap-opts.def + +### Man + +$(srcdir)/update-leap.1update-leapman: $(srcdir)/update-leap-opts.def $(std_def_list) + $(run_ag) -DMAN_SECTION=1update-leapman -Tagman-cmd.tpl update-leap-opts.def + +$(srcdir)/update-leap.man.in: $(srcdir)/update-leap.1update-leapman $(top_srcdir)/sntp/scripts/mansec2subst.sed + sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapman > $(srcdir)/update-leap.man.in+ + mv $(srcdir)/update-leap.man.in+ $(srcdir)/update-leap.man.in + +### Mdoc + +$(srcdir)/update-leap.1update-leapmdoc: $(srcdir)/update-leap-opts.def $(std_def_list) + $(run_ag) -DMAN_SECTION=1update-leapmdoc -Tagmdoc-cmd.tpl update-leap-opts.def + +$(srcdir)/update-leap.mdoc.in: $(srcdir)/update-leap.1update-leapmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed + sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapmdoc > $(srcdir)/update-leap.mdoc.in+ + mv $(srcdir)/update-leap.mdoc.in+ $(srcdir)/update-leap.mdoc.in + +### Manpage + +update-leap.$(UPDATE_LEAP_MS): $(srcdir)/update-leap.$(MANTAGFMT).in $(top_builddir)/config.status + $(top_builddir)/config.status --file=update-leap.$(UPDATE_LEAP_MS)+:$(srcdir)/update-leap.$(MANTAGFMT).in + mv update-leap.$(UPDATE_LEAP_MS)+ update-leap.$(UPDATE_LEAP_MS) + +### Texinfo + +$(srcdir)/invoke-update-leap.menu: $(srcdir)/invoke-update-leap.texi + @: do-nothing action to avoid default SCCS get, .menu built with .texi + +$(srcdir)/invoke-update-leap.texi: $(srcdir)/update-leap-opts.def $(std_def_list) + $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section update-leap-opts.def + $(top_srcdir)/scripts/build/check--help $@ + +### HTML + +$(srcdir)/update-leap.html: $(srcdir)/update-leap.texi $(top_srcdir)/sntp/include/version.texi + cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o update-leap.html update-leap.texi || true ) diff --git a/contrib/ntp/scripts/update-leap/Makefile.in b/contrib/ntp/scripts/update-leap/Makefile.in new file mode 100644 index 0000000..3ac6ac6 --- /dev/null +++ b/contrib/ntp/scripts/update-leap/Makefile.in @@ -0,0 +1,887 @@ +# 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/update-leap +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/m4/ax_c99_struct_init.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/openldap-thread-check.m4 \ + $(top_srcdir)/sntp/m4/openldap.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__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_LIBEVENT = @CPPFLAGS_LIBEVENT@ +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_LIBEVENT = @LDADD_LIBEVENT@ +LDADD_LIBNTP = @LDADD_LIBNTP@ +LDADD_LIBUTIL = @LDADD_LIBUTIL@ +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@ +UPDATE_LEAP_DB = @UPDATE_LEAP_DB@ +UPDATE_LEAP_DL = @UPDATE_LEAP_DL@ +UPDATE_LEAP_DS = @UPDATE_LEAP_DS@ +UPDATE_LEAP_MS = @UPDATE_LEAP_MS@ +UPDATE_LEAP_NI = @UPDATE_LEAP_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 = $(UPDATE_LEAP_DB) +sbin_SCRIPTS = $(UPDATE_LEAP_DS) +libexec_SCRIPTS = $(UPDATE_LEAP_DL) +noinst_SCRIPTS = $(UPDATE_LEAP_NI) +EXTRA_SCRIPTS = update-leap +man1_MANS = +man8_MANS = +@INSTALL_UPDATE_LEAP_TRUE@man_MANS = update-leap.$(UPDATE_LEAP_MS) +@INSTALL_UPDATE_LEAP_FALSE@noinst_MANS = update-leap.$(UPDATE_LEAP_MS) +EXTRA_DIST = \ + invoke-update-leap.menu \ + invoke-update-leap.texi \ + update-leap \ + update-leap-opts.def \ + update-leap-opts \ + update-leap.1update-leapman \ + update-leap.1update-leapmdoc \ + update-leap.man.in \ + update-leap.mdoc.in \ + update-leap.texi \ + update-leap.html \ + $(NULL) + +html_DATA = update-leap.html + +#CLEANFILES = update-leap.1 +DISTCLEANFILES = config.log $(man_MANS) $(noinst_MANS) +noinst_DATA = \ + invoke-update-leap.menu \ + invoke-update-leap.texi \ + update-leap.man.in \ + update-leap.mdoc.in \ + update-leap-opts \ + $(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/update-leap/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign scripts/update-leap/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): +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 + + +$(srcdir)/update-leap: $(srcdir)/update-leap-opts + @: do-nothing action to avoid default SCCS get + +$(srcdir)/update-leap-opts: update-leap-opts.def $(std_def_list) + $(run_ag) update-leap-opts.def + +### Man + +$(srcdir)/update-leap.1update-leapman: $(srcdir)/update-leap-opts.def $(std_def_list) + $(run_ag) -DMAN_SECTION=1update-leapman -Tagman-cmd.tpl update-leap-opts.def + +$(srcdir)/update-leap.man.in: $(srcdir)/update-leap.1update-leapman $(top_srcdir)/sntp/scripts/mansec2subst.sed + sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapman > $(srcdir)/update-leap.man.in+ + mv $(srcdir)/update-leap.man.in+ $(srcdir)/update-leap.man.in + +### Mdoc + +$(srcdir)/update-leap.1update-leapmdoc: $(srcdir)/update-leap-opts.def $(std_def_list) + $(run_ag) -DMAN_SECTION=1update-leapmdoc -Tagmdoc-cmd.tpl update-leap-opts.def + +$(srcdir)/update-leap.mdoc.in: $(srcdir)/update-leap.1update-leapmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed + sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapmdoc > $(srcdir)/update-leap.mdoc.in+ + mv $(srcdir)/update-leap.mdoc.in+ $(srcdir)/update-leap.mdoc.in + +### Manpage + +update-leap.$(UPDATE_LEAP_MS): $(srcdir)/update-leap.$(MANTAGFMT).in $(top_builddir)/config.status + $(top_builddir)/config.status --file=update-leap.$(UPDATE_LEAP_MS)+:$(srcdir)/update-leap.$(MANTAGFMT).in + mv update-leap.$(UPDATE_LEAP_MS)+ update-leap.$(UPDATE_LEAP_MS) + +### Texinfo + +$(srcdir)/invoke-update-leap.menu: $(srcdir)/invoke-update-leap.texi + @: do-nothing action to avoid default SCCS get, .menu built with .texi + +$(srcdir)/invoke-update-leap.texi: $(srcdir)/update-leap-opts.def $(std_def_list) + $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section update-leap-opts.def + $(top_srcdir)/scripts/build/check--help $@ + +### HTML + +$(srcdir)/update-leap.html: $(srcdir)/update-leap.texi $(top_srcdir)/sntp/include/version.texi + cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o update-leap.html update-leap.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/contrib/ntp/scripts/update-leap/invoke-update-leap.menu b/contrib/ntp/scripts/update-leap/invoke-update-leap.menu new file mode 100644 index 0000000..e27e349 --- /dev/null +++ b/contrib/ntp/scripts/update-leap/invoke-update-leap.menu @@ -0,0 +1 @@ +* update-leap Invocation:: Invoking update-leap diff --git a/contrib/ntp/scripts/update-leap/invoke-update-leap.texi b/contrib/ntp/scripts/update-leap/invoke-update-leap.texi new file mode 100644 index 0000000..8fc25db --- /dev/null +++ b/contrib/ntp/scripts/update-leap/invoke-update-leap.texi @@ -0,0 +1,170 @@ +@node update-leap Invocation +@section Invoking update-leap +@pindex update-leap +@cindex leap-seconds file manager/updater +@ignore +# +# EDIT THIS FILE WITH CAUTION (invoke-update-leap.texi) +# +# It has been AutoGen-ed April 7, 2015 at 04:21:44 AM by AutoGen 5.18.5pre4 +# From the definitions update-leap-opts.def +# and the template file agtexi-cmd.tpl +@end ignore + + + +@code{update-leap} +will validate the file currently on the local system +and if necessary, updates leap-second definition file. + +Ordinarily, the file is found using the "leapfile" directive in +@code{ntp.conf(5)}. +However, an alternate location can be specified on the command line. + +If the file does not exist, is not valid, has expired, or is expiring soon, +a new copy will be downloaded. If the new copy validates, it is installed and +NTP is (optionally) restarted. + +If the current file is acceptable, no download or restart occurs. + +-c can also be used to invoke another script to perform administrative +functions, e.g. to copy the file to other local systems. +.PP +This can be run as a cron job. As the file is rarely updated, and leap +seconds are announced at least one month in advance (usually longer), it +need not be run more frequently than about once every three weeks. +.PP +For cron-friendly behavior, define CRONJOB=1 in the crontab. +.PP +This script depends on$REQUIREDCMDS + +This section was generated by @strong{AutoGen}, +using the @code{agtexi-cmd} template and the option descriptions for the @code{update-leap} program. + +@menu +* update-leap usage:: update-leap help/usage (@option{--help}) +* update-leap source-url:: source-url option (-s) +* update-leap ipv4:: ipv4 option (-4) +* update-leap destination:: destination option (-d) +* update-leap expiration:: expiration option (-e) +* update-leap ntp-conf-file:: ntp-conf-file option (-f) +* update-leap force-update:: force-update option (-F) +* update-leap exit status:: exit status +* update-leap Usage:: Usage +* update-leap Authors:: Authors +@end menu + +@node update-leap usage +@subsection update-leap help/usage (@option{--help}) +@cindex update-leap help + +This is the automatically generated usage text for update-leap. + +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 +/bin/bash: line 136: ./update-leap: Permission denied +@end example +@exampleindent 4 + +@node update-leap source-url +@subsection source-url option (-s) +@cindex update-leap-source-url + +This is the ``the url of the master copy of the leapseconds file'' option. +This option takes a string argument. +Specify the URL of the master copy to download +$LEAPSRC +@node update-leap ipv4 +@subsection ipv4 option (-4) +@cindex update-leap-ipv4 + +This is the ``use only ipv4 addresses for dns name resolution'' option. + +@noindent +This option has some usage constraints. It: +@itemize @bullet +@item +must not appear in combination with any of the following options: +ipv6. +@end itemize + + Force DNS resolution of following host names on the command line + to the IPv4 namespace. + _EndOfDoc_; +}; + +flag = { + name = ipv6; + flags-cant = ipv4, prefer; + value = 6; + descrip = "Use only IPv6 addresses for DNS name resolution"; + doc = <<- _EndOfDoc_ + Force DNS resolution of following host names on the command line + to the IPv6 namespace. + _EndOfDoc_; +}; + +flag = { + name = prefer; + flags-cant = ipv4, ipv6; + value = p; + arg-type = keyword; + keyword = 4, 6; + descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either'; + doc = <<- _EndOfDoc_ +Prefer IPv4 or IPv6 (as specified) addresses, but use either. +@node update-leap destination +@subsection destination option (-d) +@cindex update-leap-destination + +This is the ``filename on the local system'' option. +This option takes a string argument @file{float}. +The name to use to store the leapfile on the local system. +$LEAPFILE +@node update-leap expiration +@subsection expiration option (-e) +@cindex update-leap-expiration + +This is the ``refresh the leapfile this long before it expires'' option. +This option takes a string argument. +Specify how long before expiration the file is to be refreshed +Units are required, e.g. "-e 60 days" Note that larger values +imply more frequent refreshes. +"$PREFETCH" +@node update-leap ntp-conf-file +@subsection ntp-conf-file option (-f) +@cindex update-leap-ntp-conf-file + +This is the ``location of the ntp.conf file'' option. +This option takes a string argument. +Specify location of ntp.conf (used to make sure leapfile directive is +present and to default leapfile) +/etc/ntp.conf +@node update-leap force-update +@subsection force-update option (-F) +@cindex update-leap-force-update + +This is the ``force update of the leapfile'' option. +Force update even if current file is OK and not close to expiring. +@node update-leap exit status +@subsection update-leap 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 update-leap Usage +@subsection update-leap Usage +@node update-leap Authors +@subsection update-leap Authors diff --git a/contrib/ntp/scripts/update-leap/update-leap b/contrib/ntp/scripts/update-leap/update-leap new file mode 100644 index 0000000..2dab4ec --- /dev/null +++ b/contrib/ntp/scripts/update-leap/update-leap @@ -0,0 +1,434 @@ +#!/bin/bash + +# Copyright (C) 2014 Timothe Litt litt at acm dot org + +# This script may be freely copied, used and modified providing that +# this notice and the copyright statement are included in all copies +# and derivative works. No warranty is offered, and use is entirely at +# your own risk. Bugfixes and improvements would be appreciated by the +# author. + +VERSION="1.003" + +# leap-seconds file manager/updater + +# Depends on: +# wget sed, tr, shasum, logger + +# ########## Default configuration ########## +# +# Where to get the file +LEAPSRC="ftp://time.nist.gov/pub/leap-seconds.list" + +# How many times to try to download new file +MAXTRIES=6 +INTERVAL=10 + +# Where to find ntp config file +NTPCONF=/etc/ntp.conf + +# How long before expiration to get updated file +PREFETCH="60 days" + +# How to restart NTP - older NTP: service ntpd? try-restart | condrestart +# Recent NTP checks for new file daily, so there's nothing to do +RESTART= + +# Where to put temporary copy before it's validated +TMPFILE="/tmp/leap-seconds.$$.tmp" + +# Syslog facility +LOGFAC=daemon +# ########################################### + +# Places to look for commands. Allows for CRON having path to +# old utilities on embedded systems + +PATHLIST="/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:" + +REQUIREDCMDS=" wget logger tr sed shasum" + +SELF="`basename $0`" + +function displayHelp { + cat <<EOF +Usage: $SELF [options] [leapfile] + +Verifies and if necessary, updates leap-second definition file + +All arguments are optional: Default (or current value) shown: + -s Specify the URL of the master copy to download + $LEAPSRC + -4 Use only IPv4 + -6 Use only IPv6 + -p 4|6 + Prefer IPv4 or IPv6 (as specified) addresses, but use either + -d Specify the filename on the local system + $LEAPFILE + -e Specify how long before expiration the file is to be refreshed + Units are required, e.g. "-e 60 days" Note that larger values + imply more frequent refreshes. + "$PREFETCH" + -f Specify location of ntp.conf (used to make sure leapfile directive is + present and to default leapfile) + $NTPCONF + -F Force update even if current file is OK and not close to expiring. + -c Command to restart NTP after installing a new file + <none> - ntpd checks file daily + -r Specify number of times to retry on get failure + $MAXTRIES + -i Specify number of minutes between retries + $INTERVAL + -l Use syslog for output (Implied if CRONJOB is set) + -L Don't use syslog for output + -P Specify the syslog facility for logging + $LOGFAC + -t Name of temporary file used in validation + $TMPFILE + -q Only report errors to stdout + -v Verbose output + -z Specify path for utilities + $PATHLIST + -Z Only use system path + +$SELF will validate the file currently on the local system + +Ordinarily, the file is found using the "leapfile" directive in $NTPCONF. +However, an alternate location can be specified on the command line. + +If the file does not exist, is not valid, has expired, or is expiring soon, +a new copy will be downloaded. If the new copy validates, it is installed and +NTP is (optionally) restarted. + +If the current file is acceptable, no download or restart occurs. + +-c can also be used to invoke another script to perform administrative +functions, e.g. to copy the file to other local systems. + +This can be run as a cron job. As the file is rarely updated, and leap +seconds are announced at least one month in advance (usually longer), it +need not be run more frequently than about once every three weeks. + +For cron-friendly behavior, define CRONJOB=1 in the crontab. + +This script depends on$REQUIREDCMDS + +Version $VERSION +EOF + return 0 +} + +# Default: Use syslog for logging if running under cron + +SYSLOG="$CRONJOB" + +if [ "$1" = "--help" ]; then + displayHelp + exit 0 +fi + +# Parse options + +while getopts 46p:P:s:e:f:Fc:r:i:lLt:hqvz:Z opt; do + case $opt in + 4) + PROTO="-4" + ;; + 6) + PROTO="-6" + ;; + p) + if [ "$OPTARG" = '4' -o "$OPTARG" = '6' ]; then + PREFER="--prefer-family=IPv$OPTARG" + else + echo "Invalid -p $OPTARG" >&2 + exit 1; + fi + ;; + P) + LOGFAC="$OPTARG" + ;; + s) + LEAPSRC="$OPTARG" + ;; + e) + PREFETCH="$OPTARG" + ;; + f) + NTPCONF="$OPTARG" + ;; + F) + FORCE="Y" + ;; + c) + RESTART="$OPTARG" + ;; + r) + MAXTRIES="$OPTARG" + ;; + i) + INTERVAL="$OPTARG" + ;; + t) + TMPFILE="$OPTARG" + ;; + l) + SYSLOG="y" + ;; + L) + SYSLOG= + ;; + h) + displayHelp + exit 0 + ;; + q) + QUIET="Y" + ;; + v) + VERBOSE="Y" + ;; + z) + PATHLIST="$OPTARG:" + ;; + Z) + PATHLIST= + ;; + *) + echo "$SELF -h for usage" >&2 + exit 1 + ;; + esac +done +shift $((OPTIND-1)) + +export PATH="$PATHLIST$PATH" + +# Add to path to deal with embedded systems +# +for P in $REQUIREDCMDS ; do + if >/dev/null 2>&1 which "$P" ; then + continue + fi + [ "$P" = "logger" ] && continue + echo "FATAL: missing $P command, please install" + exit 1 +done + +# Handle logging + +if ! LOGGER="`2>/dev/null which logger`" ; then + LOGGER= +fi + +function log { + # "priority" "message" + # + # Stdout unless syslog specified or logger isn't available + # + if [ -z "$SYSLOG" -o -z "$LOGGER" ]; then + if [ -n "$QUIET" -a \( "$1" = "info" -o "$1" = "notice" -o "$1" = "debug" \) ]; then + return 0 + fi + echo "`echo \"$1\" | tr a-z A-Z`: $2" + return 0 + fi + + # Also log to stdout if cron job && notice or higher + local S + if [ -n "$CRONJOB" -a \( "$1" != "info" \) -a \( "$1" != "debug" \) ] || [ -n "$VERBOSE" ]; then + S="-s" + fi + $LOGGER $S -t "$SELF[$$]" -p "$LOGFAC.$1" "$2" +} + +# Verify interval +INTERVAL=$(( $INTERVAL *1 )) + +# Validate a leap-seconds file checksum +# +# File format: (full description in files) +# # marks comments, except: +# #$ number : the NTP date of the last update +# #@ number : the NTP date that the file expires +# Date (seconds since 1900) leaps : leaps is the # of seconds to add for times >= Date +# Date lines have comments. +# #h hex hex hex hex hex is the SHA-1 checksum of the data & dates, excluding whitespace w/o leading zeroes + +function verifySHA { + + if [ ! -f "$1" ]; then + return 1 + fi + + # Remove comments, except those that are markers for last update, expires and hash + + local RAW="`sed $1 -e'/^\\([0-9]\\|#[\$@h]\)/!d' -e'/^#[\$@h]/!s/#.*\$//g'`" + + # Extract just the data, removing all whitespace + + local DATA="`echo \"$RAW\" | sed -e'/^#h/d' -e's/^#[\$@]//g' | tr -d '[:space:]'`" + + # Compute the SHA hash of the data, removing the marker and filename + # Computed in binary mode, which shouldn't matter since whitespace has been removed + # shasum comes in several flavors; a portable one is available in Perl (with Digest::SHA) + + local DSHA="`echo -n \"$DATA\" | shasum | sed -e's/[? *].*$//'`" + + # Extract the file's hash. Restore any leading zeroes in hash segments. + + # The sed [] includes a tab (\t) and space; #h is followed by a tab and space + local FSHA="`echo \"$RAW\" | sed -e'/^#h/!d' -e's/^#h//' -e's/[ ] */ 0x/g'`" + FSHA=`printf '%08x%08x%08x%08x%08x' $FSHA` + + if [ -n "$FSHA" -a \( "$FSHA" = "$DSHA" \) ]; then + if [ -n "$2" ]; then + log "info" "Checksum of $1 validated" + fi + else + log "error" "Checksum of $1 is invalid:" + [ -z "$FSHA" ] && FSHA="(no checksum record found in file)" + log "error" "EXPECTED: $FSHA" + log "error" "COMPUTED: $DSHA" + return 1 + fi + + # Check the expiration date, converting NTP epoch to Unix epoch used by date + + EXPIRES="`echo \"$RAW\" | sed -e'/^#@/!d' -e's/^#@//' | tr -d '[:space:]'`" + EXPIRES="$(($EXPIRES - 2208988800 ))" + + if [ $EXPIRES -lt `date -u +%s` ]; then + log "notice" "File expired on `date -u -d \"Jan 1, 1970 00:00:00 +0000 + $EXPIRES seconds\"`" + return 2 + fi + +} + +# Verify ntp.conf + +if ! [ -f "$NTPCONF" ]; then + log "critical" "Missing ntp configuration $NTPCONF" + exit 1 +fi + +# Parse ntp.conf for leapfile directive + +LEAPFILE="`sed $NTPCONF -e'/^ *leapfile *.*$/!d' -e's/^ *leapfile *//'`" +if [ -z "$LEAPFILE" ]; then + log "error" "$NTPCONF does not specify a leapfile" +fi + +# Allow placing the file someplace else - testing + +if [ -n "$1" ]; then + if [ "$1" != "$LEAPFILE" ]; then + log "notice" "Requested install to $1, but $NTPCONF specifies $LEAPFILE" + fi + LEAPFILE="$1" +fi + +# Verify the current file +# If it is missing, doesn't validate or expired +# Or is expiring soon +# Download a new one + +if [ -n "$FORCE" ] || ! verifySHA $LEAPFILE "$VERBOSE" || [ $EXPIRES -lt `date -d "NOW + $PREFETCH" +%s` ] ; then + TRY=0 + while true; do + TRY=$(( $TRY + 1 )) + if [ -n "$VERBOSE" ]; then + log "info" "Attempting download from $LEAPSRC, try $TRY.." + fi + if wget $PROTO $PREFER -o ${TMPFILE}.log $LEAPSRC -O $TMPFILE ; then + log "info" "Download of $LEAPSRC succeeded" + if [ -n "$VERBOSE" ]; then + cat ${TMPFILE}.log + fi + + if ! verifySHA $TMPFILE "$VERBOSE" ; then + # There is no point in retrying, as the file on the server is almost + # certainly corrupt. + + log "warning" "Downloaded file $TMPFILE rejected -- saved for diagnosis" + cat ${TMPFILE}.log + rm -f ${TMPFILE}.log + exit 1 + fi + rm -f ${TMPFILE}.log + + # Set correct permissions on temporary file + + REFFILE="$LEAPFILE" + if [ ! -f $LEAPFILE ]; then + log "notice" "$LEAPFILE was missing, creating new copy - check permissions" + touch $LEAPFILE + # Can't copy permissions from old file, copy from NTPCONF instead + REFFILE="$NTPCONF" + fi + chmod --reference $REFFILE $TMPFILE + chown --reference $REFFILE $TMPFILE + ( which selinuxenabled && selinuxenabled && which chcon ) >/dev/null 2>&1 + if [ $? == 0 ] ; then + chcon --reference $REFFILE $TMPFILE + fi + + # Replace current file with validated new one + + if mv -f $TMPFILE $LEAPFILE ; then + log "notice" "Installed new $LEAPFILE from $LEAPSRC" + else + log "error" "Install $TMPFILE => $LEAPFILE failed -- saved for diagnosis" + exit 1 + fi + + # Restart NTP (or whatever else is specified) + + if [ -n "$RESTART" ]; then + if [ -n "$VERBOSE" ]; then + log "info" "Attempting restart action: $RESTART" + fi + R="$( 2>&1 $RESTART )" + if [ $? -eq 0 ]; then + log "notice" "Restart action succeeded" + if [ -n "$VERBOSE" -a -n "$R" ]; then + log "info" "$R" + fi + else + log "error" "Restart action failed" + if [ -n "$R" ]; then + log "error" "$R" + fi + exit 2 + fi + fi + exit 0 + fi + + # Failed to download. See about trying again + + rm -f $TMPFILE + if [ $TRY -ge $MAXTRIES ]; then + break; + fi + if [ -n "$VERBOSE" ]; then + cat ${TMPFILE}.log + log "info" "Waiting $INTERVAL minutes before retrying..." + fi + sleep $(( $INTERVAL * 60)) + done + + # Failed and out of retries + + log "warning" "Download from $LEAPSRC failed after $TRY attempts" + if [ -f ${TMPFILE}.log ]; then + cat ${TMPFILE}.log + rm -f ${TMPFILE}.log $TMPFILE + fi + exit 1 +fi +log "info" "Not time to replace $LEAPFILE" + +exit 0 + +# EOF
\ No newline at end of file diff --git a/contrib/ntp/scripts/update-leap/update-leap-opts b/contrib/ntp/scripts/update-leap/update-leap-opts new file mode 100644 index 0000000..69dba65 --- /dev/null +++ b/contrib/ntp/scripts/update-leap/update-leap-opts @@ -0,0 +1,72 @@ +# EDIT THIS FILE WITH CAUTION (update-leap-opts) +# +# It has been AutoGen-ed April 7, 2015 at 04:21:40 AM by AutoGen 5.18.5pre4 +# From the definitions update-leap-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 = { + 'source-url' => '', + 'ipv4' => '', + 'destination' => '', + 'expiration' => '', + 'ntp-conf-file' => '', + 'force-update' => '', + 'dont-wait' => '', + 'help' => '', 'more-help' => '' + }; + my $argument = ''; + my $ret = GetOptionsFromArray($args, $opts, ( + 'source-url|s=s', 'ipv4|4', 'destination|d=f', + 'expiration|e=s', 'ntp-conf-file|f=s', 'force-update|F', + 'dont-wait', + 'help|?', 'more-help')); + + $usage = <<'USAGE'; +update-leap - leap-seconds file manager/updater - Ver. 4.2.8p2 +USAGE: update-leap [ -<flag> [<val>] | --<name>[{=| }<val>] ]... + + -s, --source-url=str The URL of the master copy of the leapseconds file + -4, --ipv4 Use only IPv4 addresses for DNS name resolution + -d, --destination=float Filename on the local system + -e, --expiration=str Refresh the leapfile this long before it expires + -f, --ntp-conf-file=str Location of the ntp.conf file + -F, --force-update Force update of the leapfile + --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/contrib/ntp/scripts/update-leap/update-leap-opts.def b/contrib/ntp/scripts/update-leap/update-leap-opts.def new file mode 100644 index 0000000..9e73916 --- /dev/null +++ b/contrib/ntp/scripts/update-leap/update-leap-opts.def @@ -0,0 +1,163 @@ +/* -*- Mode: Text -*- */ +autogen definitions perlopt; + +#include autogen-version.def + +prog-name = 'update-leap'; +prog-title = 'leap-seconds file manager/updater'; +package = ntp; +#include version.def + +long-opts; +gnu-usage; + +flag = { + name = source-url; + value = s; + arg-type = string; + descrip = 'The URL of the master copy of the leapseconds file'; + doc = <<- _EndOfDoc_ + Specify the URL of the master copy to download + $LEAPSRC + _EndOfDoc_; +}; +flag = { + name = ipv4; + flags-cant = ipv6; + value = 4; + descrip = "Use only IPv4 addresses for DNS name resolution"; + doc = <<- _EndOfDoc_ + Force DNS resolution of following host names on the command line + to the IPv4 namespace. + _EndOfDoc_; +}; + +flag = { + name = ipv6; + flags-cant = ipv4, prefer; + value = 6; + descrip = "Use only IPv6 addresses for DNS name resolution"; + doc = <<- _EndOfDoc_ + Force DNS resolution of following host names on the command line + to the IPv6 namespace. + _EndOfDoc_; +}; + +flag = { + name = prefer; + flags-cant = ipv4, ipv6; + value = p; + arg-type = keyword; + keyword = 4, 6; + descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either'; + doc = <<- _EndOfDoc_ + Prefer IPv4 or IPv6 (as specified) addresses, but use either. + _EndOfDoc_; +}; + +flag = { + name = destination; + value = d; + arg-type = string; + arg-name = float; + descrip = 'Filename on the local system'; + doc = <<- _EndOfDoc_ + The name to use to store the leapfile on the local system. + $LEAPFILE + _EndOfDoc_; +}; + +flag = { + name = expiration; + value = e; + arg-type = string; + descrip = 'Refresh the leapfile this long before it expires'; + doc = <<- _EndOfDoc_ + Specify how long before expiration the file is to be refreshed + Units are required, e.g. "-e 60 days" Note that larger values + imply more frequent refreshes. + "$PREFETCH" + _EndOfDoc_; +}; + +flag = { + name = ntp-conf-file; + value = f; + arg-type = string; + descrip = 'Location of the ntp.conf file'; + doc = <<- _EndOfDoc_ + Specify location of ntp.conf (used to make sure leapfile directive is + present and to default leapfile) + /etc/ntp.conf + _EndOfDoc_; +}; + +flag = { + name = force-update; + value = F; + descrip = 'Force update of the leapfile'; + doc = <<- _EndOfDoc_ + Force update even if current file is OK and not close to expiring. + _EndOfDoc_; +}; + +flag = { + name = dont-wait; + descrip = "Don't wait for keystroke between plots"; + doc = <<- _EndOfDoc_ + _EndOfDoc_; +}; + +/* explain: Additional information whenever the usage routine is invoked */ +explain = <<- _END_EXPLAIN + _END_EXPLAIN; + +doc-section = { + ds-type = 'DESCRIPTION'; + ds-format = 'mdoc'; + ds-text = <<- _END_PROG_MDOC_DESCRIP +.Nm +will validate the file currently on the local system +and if necessary, updates leap-second definition file. +.Pp +Ordinarily, the file is found using the "leapfile" directive in +.Xr ntp.conf 5 . +However, an alternate location can be specified on the command line. +.Pp +If the file does not exist, is not valid, has expired, or is expiring soon, +a new copy will be downloaded. If the new copy validates, it is installed and +NTP is (optionally) restarted. +.Pp +If the current file is acceptable, no download or restart occurs. +.Pp +-c can also be used to invoke another script to perform administrative +functions, e.g. to copy the file to other local systems. +.PP +This can be run as a cron job. As the file is rarely updated, and leap +seconds are announced at least one month in advance (usually longer), it +need not be run more frequently than about once every three weeks. +.PP +For cron-friendly behavior, define CRONJOB=1 in the crontab. +.PP +This script depends on$REQUIREDCMDS + _END_PROG_MDOC_DESCRIP; +}; + + +doc-section = { + ds-type = 'USAGE'; + ds-format = 'mdoc'; + ds-text = <<- _END_MDOC_USAGE + +Usage stuff + + _END_MDOC_USAGE; +}; + +doc-section = { + ds-type = 'AUTHORS'; + ds-format = 'mdoc'; + ds-text = <<- _END_MDOC_AUTHORS +.An "Timothe Litt" + _END_MDOC_AUTHORS; +}; diff --git a/contrib/ntp/scripts/update-leap/update-leap.1update-leapman b/contrib/ntp/scripts/update-leap/update-leap.1update-leapman new file mode 100644 index 0000000..a164347 --- /dev/null +++ b/contrib/ntp/scripts/update-leap/update-leap.1update-leapman @@ -0,0 +1,169 @@ +.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 update-leap 1update-leapman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands" +.\" +.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-E0ayAX/ag-R0aGzX) +.\" +.\" It has been AutoGen-ed April 7, 2015 at 04:21:40 AM by AutoGen 5.18.5pre4 +.\" From the definitions update-leap-opts.def +.\" and the template file agman-cmd.tpl +.SH NAME +\f\*[B-Font]update-leap\fP +\- leap-seconds file manager/updater +.SH SYNOPSIS +\f\*[B-Font]update-leap\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]update-leap\fP +will validate the file currently on the local system +and if necessary, updates leap-second definition file. +.sp \n(Ppu +.ne 2 + +Ordinarily, the file is found using the "leapfile" directive in +\fCntp.conf\fR(5)\f[]. +However, an alternate location can be specified on the command line. +.sp \n(Ppu +.ne 2 + +If the file does not exist, is not valid, has expired, or is expiring soon, +a new copy will be downloaded. If the new copy validates, it is installed and +NTP is (optionally) restarted. +.sp \n(Ppu +.ne 2 + +If the current file is acceptable, no download or restart occurs. +.sp \n(Ppu +.ne 2 + +-c can also be used to invoke another script to perform administrative +functions, e.g. to copy the file to other local systems. +.PP +This can be run as a cron job. As the file is rarely updated, and leap +seconds are announced at least one month in advance (usually longer), it +need not be run more frequently than about once every three weeks. +.PP +For cron-friendly behavior, define CRONJOB=1 in the crontab. +.PP +This script depends on$REQUIREDCMDS +.SH "OPTIONS" +.TP +.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-source\-url\f[]=\f\*[I-Font]string\f[] +The URL of the master copy of the leapseconds file. +.sp +Specify the URL of the master copy to download +$LEAPSRC +.TP +.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[] +Use only IPv4 addresses for DNS name resolution. +This option must not appear in combination with any of the following options: +ipv6. +.sp + Force DNS resolution of following host names on the command line + to the IPv4 namespace. + _EndOfDoc_; +}; +.sp +flag = { + name = ipv6; + flags-cant = ipv4, prefer; + value = 6; + descrip = "Use only IPv6 addresses for DNS name resolution"; + doc = <<- _EndOfDoc_ + Force DNS resolution of following host names on the command line + to the IPv6 namespace. + _EndOfDoc_; +}; +.sp +flag = { + name = prefer; + flags-cant = ipv4, ipv6; + value = p; + arg-type = keyword; + keyword = 4, 6; + descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either'; + doc = <<- _EndOfDoc_ +Prefer IPv4 or IPv6 (as specified) addresses, but use either. +.TP +.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]float\f[], \f\*[B-Font]\-\-destination\f[]=\f\*[I-Font]float\f[] +Filename on the local system. +.sp +The name to use to store the leapfile on the local system. +$LEAPFILE +.TP +.NOP \f\*[B-Font]\-e\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-expiration\f[]=\f\*[I-Font]string\f[] +Refresh the leapfile this long before it expires. +.sp +Specify how long before expiration the file is to be refreshed +Units are required, e.g. "-e 60 days" Note that larger values +imply more frequent refreshes. +"$PREFETCH" +.TP +.NOP \f\*[B-Font]\-f\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-ntp\-conf\-file\f[]=\f\*[I-Font]string\f[] +Location of the ntp.conf file. +.sp +Specify location of ntp.conf (used to make sure leapfile directive is +present and to default leapfile) +/etc/ntp.conf +.TP +.NOP \f\*[B-Font]\-F\f[], \f\*[B-Font]\-\-force\-update\f[] +Force update of the leapfile. +.sp +Force update even if current file is OK and not close to expiring. +.TP +.NOP \f\*[B-Font]\-\-dont\-wait\f[] +Don't wait for keystroke between plots. +.sp +.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 USAGE +Usage stuff +.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 "Timothe Litt" +.br +.SH "NOTES" +This manual page was \fIAutoGen\fP-erated from the \fBupdate-leap\fP +option definitions. diff --git a/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc b/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc new file mode 100644 index 0000000..9fb3a12 --- /dev/null +++ b/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc @@ -0,0 +1,134 @@ +.Dd April 7 2015 +.Dt UPDATE_LEAP 1update-leapmdoc User Commands +.Os +.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc) +.\" +.\" It has been AutoGen-ed April 7, 2015 at 04:21:46 AM by AutoGen 5.18.5pre4 +.\" From the definitions update-leap-opts.def +.\" and the template file agmdoc-cmd.tpl +.Sh NAME +.Nm update-leap +.Nd leap-seconds file manager/updater +.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 validate the file currently on the local system +and if necessary, updates leap\-second definition file. +.Pp +Ordinarily, the file is found using the "leapfile" directive in +.Xr ntp.conf 5 . +However, an alternate location can be specified on the command line. +.Pp +If the file does not exist, is not valid, has expired, or is expiring soon, +a new copy will be downloaded. If the new copy validates, it is installed and +NTP is (optionally) restarted. +.Pp +If the current file is acceptable, no download or restart occurs. +.Pp +-c can also be used to invoke another script to perform administrative +functions, e.g. to copy the file to other local systems. +.PP +This can be run as a cron job. As the file is rarely updated, and leap +seconds are announced at least one month in advance (usually longer), it +need not be run more frequently than about once every three weeks. +.PP +For cron\-friendly behavior, define CRONJOB=1 in the crontab. +.PP +This script depends on$REQUIREDCMDS +.Sh "OPTIONS" +.Bl -tag +.It Fl s Ar string , Fl \-source\-url Ns = Ns Ar string +The URL of the master copy of the leapseconds file. +.sp +Specify the URL of the master copy to download +$LEAPSRC +.It Fl 4 , Fl \-ipv4 +Use only IPv4 addresses for DNS name resolution. +This option must not appear in combination with any of the following options: +ipv6. +.sp + Force DNS resolution of following host names on the command line + to the IPv4 namespace. + _EndOfDoc_; +}; +.sp +flag = { + name = ipv6; + flags\-cant = ipv4, prefer; + value = 6; + descrip = "Use only IPv6 addresses for DNS name resolution"; + doc = <<\- _EndOfDoc_ + Force DNS resolution of following host names on the command line + to the IPv6 namespace. + _EndOfDoc_; +}; +.sp +flag = { + name = prefer; + flags\-cant = ipv4, ipv6; + value = p; + arg\-type = keyword; + keyword = 4, 6; + descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either'; + doc = <<\- _EndOfDoc_ +Prefer IPv4 or IPv6 (as specified) addresses, but use either. +.It Fl d Ar float , Fl \-destination Ns = Ns Ar float +Filename on the local system. +.sp +The name to use to store the leapfile on the local system. +$LEAPFILE +.It Fl e Ar string , Fl \-expiration Ns = Ns Ar string +Refresh the leapfile this long before it expires. +.sp +Specify how long before expiration the file is to be refreshed +Units are required, e.g. "\-e 60 days" Note that larger values +imply more frequent refreshes. +"$PREFETCH" +.It Fl f Ar string , Fl \-ntp\-conf\-file Ns = Ns Ar string +Location of the ntp.conf file. +.sp +Specify location of ntp.conf (used to make sure leapfile directive is +present and to default leapfile) +/etc/ntp.conf +.It Fl F , Fl \-force\-update +Force update of the leapfile. +.sp +Force update even if current file is OK and not close to expiring. +.It Fl \-dont\-wait +Don't wait for keystroke between plots. +.sp +.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 USAGE +Usage stuff +.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 "Timothe Litt" +.Sh "NOTES" +This manual page was \fIAutoGen\fP\-erated from the \fBupdate\-leap\fP +option definitions. diff --git a/contrib/ntp/scripts/update-leap/update-leap.html b/contrib/ntp/scripts/update-leap/update-leap.html new file mode 100644 index 0000000..3a731ac --- /dev/null +++ b/contrib/ntp/scripts/update-leap/update-leap.html @@ -0,0 +1,274 @@ +<html lang="en"> +<head> +<title>update-leap User's Manual</title> +<meta http-equiv="Content-Type" content="text/html"> +<meta name="description" content="update-leap 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">update-leap User's Manual</h1> +<div class="node"> +<p><hr> +<a name="Top"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-Description">update-leap Description</a>, +Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>, +Up: <a rel="up" accesskey="u" href="#dir">(dir)</a> +<br> +</div> + + <p>This document describes the use of the NTP Project's <code>update-leap</code> program. + + <p>This document applies to version 4.2.8p2 of <code>update-leap</code>. + +<div class="shortcontents"> +<h2>Short Contents</h2> +<ul> +</ul> +</div> + +<ul class="menu"> +<li><a accesskey="1" href="#update_002dleap-Description">update-leap Description</a>: Description +<li><a accesskey="2" href="#update_002dleap-Invocation">update-leap Invocation</a>: Invoking update-leap +</ul> + +<div class="node"> +<p><hr> +<a name="update_002dleap-Invocation"></a> +<br> +</div> + +<h3 class="section">0.1 Invoking update-leap</h3> + +<p><a name="index-update_002dleap-1"></a><a name="index-leap_002dseconds-file-manager_002fupdater-2"></a> + + <p><code>update-leap</code> +will validate the file currently on the local system +and if necessary, updates leap-second definition file. + + <p>Ordinarily, the file is found using the "leapfile" directive in +<code>ntp.conf(5)</code>. +However, an alternate location can be specified on the command line. + + <p>If the file does not exist, is not valid, has expired, or is expiring soon, +a new copy will be downloaded. If the new copy validates, it is installed and +NTP is (optionally) restarted. + + <p>If the current file is acceptable, no download or restart occurs. + + <p>-c can also be used to invoke another script to perform administrative +functions, e.g. to copy the file to other local systems. +.PP +This can be run as a cron job. As the file is rarely updated, and leap +seconds are announced at least one month in advance (usually longer), it +need not be run more frequently than about once every three weeks. +.PP +For cron-friendly behavior, define CRONJOB=1 in the crontab. +.PP +This script depends on$REQUIREDCMDS + + <p>This section was generated by <strong>AutoGen</strong>, +using the <code>agtexi-cmd</code> template and the option descriptions for the <code>update-leap</code> program. + +<ul class="menu"> +<li><a accesskey="1" href="#update_002dleap-usage">update-leap usage</a>: update-leap help/usage (<span class="option">--help</span>) +<li><a accesskey="2" href="#update_002dleap-source_002durl">update-leap source-url</a>: source-url option (-s) +<li><a accesskey="3" href="#update_002dleap-ipv4">update-leap ipv4</a>: ipv4 option (-4) +<li><a accesskey="4" href="#update_002dleap-destination">update-leap destination</a>: destination option (-d) +<li><a accesskey="5" href="#update_002dleap-expiration">update-leap expiration</a>: expiration option (-e) +<li><a accesskey="6" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>: ntp-conf-file option (-f) +<li><a accesskey="7" href="#update_002dleap-force_002dupdate">update-leap force-update</a>: force-update option (-F) +<li><a accesskey="8" href="#update_002dleap-exit-status">update-leap exit status</a>: exit status +<li><a accesskey="9" href="#update_002dleap-Usage">update-leap Usage</a>: Usage +<li><a href="#update_002dleap-Authors">update-leap Authors</a>: Authors +</ul> + +<div class="node"> +<p><hr> +<a name="update_002dleap-usage"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-source_002durl">update-leap source-url</a>, +Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> +<br> +</div> + +<h4 class="subsection">0.1.1 update-leap help/usage (<span class="option">--help</span>)</h4> + +<p><a name="index-update_002dleap-help-3"></a> +This is the automatically generated usage text for update-leap. + + <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">/bin/bash: line 136: ./update-leap: Permission denied +</pre> + <div class="node"> +<p><hr> +<a name="update_002dleap-source_002durl"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-ipv4">update-leap ipv4</a>, +Previous: <a rel="previous" accesskey="p" href="#update_002dleap-usage">update-leap usage</a>, +Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> +<br> +</div> + +<h4 class="subsection">0.1.2 source-url option (-s)</h4> + +<p><a name="index-update_002dleap_002dsource_002durl-4"></a> +This is the “the url of the master copy of the leapseconds file” option. +This option takes a string argument. +Specify the URL of the master copy to download +$LEAPSRC +<div class="node"> +<p><hr> +<a name="update_002dleap-ipv4"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-destination">update-leap destination</a>, +Previous: <a rel="previous" accesskey="p" href="#update_002dleap-source_002durl">update-leap source-url</a>, +Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> +<br> +</div> + +<h4 class="subsection">0.1.3 ipv4 option (-4)</h4> + +<p><a name="index-update_002dleap_002dipv4-5"></a> +This is the “use only ipv4 addresses for dns name resolution” option. + +<p class="noindent">This option has some usage constraints. It: + <ul> +<li>must not appear in combination with any of the following options: +ipv6. +</ul> + + <p>Force DNS resolution of following host names on the command line + to the IPv4 namespace. + _EndOfDoc_; +; + + <p>flag = + name = ipv6; + flags-cant = ipv4, prefer; + value = 6; + descrip = "Use only IPv6 addresses for DNS name resolution"; + doc = <<- _EndOfDoc_ + Force DNS resolution of following host names on the command line + to the IPv6 namespace. + _EndOfDoc_; +; + + <p>flag = + name = prefer; + flags-cant = ipv4, ipv6; + value = p; + arg-type = keyword; + keyword = 4, 6; + descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either'; + doc = <<- _EndOfDoc_ +Prefer IPv4 or IPv6 (as specified) addresses, but use either. +<div class="node"> +<p><hr> +<a name="update_002dleap-destination"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-expiration">update-leap expiration</a>, +Previous: <a rel="previous" accesskey="p" href="#update_002dleap-ipv4">update-leap ipv4</a>, +Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> +<br> +</div> + +<h4 class="subsection">0.1.4 destination option (-d)</h4> + +<p><a name="index-update_002dleap_002ddestination-6"></a> +This is the “filename on the local system” option. +This option takes a string argument <span class="file">float</span>. +The name to use to store the leapfile on the local system. +$LEAPFILE +<div class="node"> +<p><hr> +<a name="update_002dleap-expiration"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>, +Previous: <a rel="previous" accesskey="p" href="#update_002dleap-destination">update-leap destination</a>, +Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> +<br> +</div> + +<h4 class="subsection">0.1.5 expiration option (-e)</h4> + +<p><a name="index-update_002dleap_002dexpiration-7"></a> +This is the “refresh the leapfile this long before it expires” option. +This option takes a string argument. +Specify how long before expiration the file is to be refreshed +Units are required, e.g. "-e 60 days" Note that larger values +imply more frequent refreshes. +"$PREFETCH" +<div class="node"> +<p><hr> +<a name="update_002dleap-ntp_002dconf_002dfile"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-force_002dupdate">update-leap force-update</a>, +Previous: <a rel="previous" accesskey="p" href="#update_002dleap-expiration">update-leap expiration</a>, +Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> +<br> +</div> + +<h4 class="subsection">0.1.6 ntp-conf-file option (-f)</h4> + +<p><a name="index-update_002dleap_002dntp_002dconf_002dfile-8"></a> +This is the “location of the ntp.conf file” option. +This option takes a string argument. +Specify location of ntp.conf (used to make sure leapfile directive is +present and to default leapfile) +/etc/ntp.conf +<div class="node"> +<p><hr> +<a name="update_002dleap-force_002dupdate"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-exit-status">update-leap exit status</a>, +Previous: <a rel="previous" accesskey="p" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>, +Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> +<br> +</div> + +<h4 class="subsection">0.1.7 force-update option (-F)</h4> + +<p><a name="index-update_002dleap_002dforce_002dupdate-9"></a> +This is the “force update of the leapfile” option. +Force update even if current file is OK and not close to expiring. +<div class="node"> +<p><hr> +<a name="update_002dleap-exit-status"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-Usage">update-leap Usage</a>, +Previous: <a rel="previous" accesskey="p" href="#update_002dleap-force_002dupdate">update-leap force-update</a>, +Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> +<br> +</div> + +<h4 class="subsection">0.1.8 update-leap 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="update_002dleap-Usage"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-Authors">update-leap Authors</a>, +Previous: <a rel="previous" accesskey="p" href="#update_002dleap-exit-status">update-leap exit status</a>, +Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> +<br> +</div> + +<h4 class="subsection">0.1.9 update-leap Usage</h4> + +<div class="node"> +<p><hr> +<a name="update_002dleap-Authors"></a>Previous: <a rel="previous" accesskey="p" href="#update_002dleap-Usage">update-leap Usage</a>, +Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> +<br> +</div> + +<h4 class="subsection">0.1.10 update-leap Authors</h4> + +</body></html> + diff --git a/contrib/ntp/scripts/update-leap/update-leap.man.in b/contrib/ntp/scripts/update-leap/update-leap.man.in new file mode 100644 index 0000000..a164347 --- /dev/null +++ b/contrib/ntp/scripts/update-leap/update-leap.man.in @@ -0,0 +1,169 @@ +.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 update-leap 1update-leapman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands" +.\" +.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-E0ayAX/ag-R0aGzX) +.\" +.\" It has been AutoGen-ed April 7, 2015 at 04:21:40 AM by AutoGen 5.18.5pre4 +.\" From the definitions update-leap-opts.def +.\" and the template file agman-cmd.tpl +.SH NAME +\f\*[B-Font]update-leap\fP +\- leap-seconds file manager/updater +.SH SYNOPSIS +\f\*[B-Font]update-leap\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]update-leap\fP +will validate the file currently on the local system +and if necessary, updates leap-second definition file. +.sp \n(Ppu +.ne 2 + +Ordinarily, the file is found using the "leapfile" directive in +\fCntp.conf\fR(5)\f[]. +However, an alternate location can be specified on the command line. +.sp \n(Ppu +.ne 2 + +If the file does not exist, is not valid, has expired, or is expiring soon, +a new copy will be downloaded. If the new copy validates, it is installed and +NTP is (optionally) restarted. +.sp \n(Ppu +.ne 2 + +If the current file is acceptable, no download or restart occurs. +.sp \n(Ppu +.ne 2 + +-c can also be used to invoke another script to perform administrative +functions, e.g. to copy the file to other local systems. +.PP +This can be run as a cron job. As the file is rarely updated, and leap +seconds are announced at least one month in advance (usually longer), it +need not be run more frequently than about once every three weeks. +.PP +For cron-friendly behavior, define CRONJOB=1 in the crontab. +.PP +This script depends on$REQUIREDCMDS +.SH "OPTIONS" +.TP +.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-source\-url\f[]=\f\*[I-Font]string\f[] +The URL of the master copy of the leapseconds file. +.sp +Specify the URL of the master copy to download +$LEAPSRC +.TP +.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[] +Use only IPv4 addresses for DNS name resolution. +This option must not appear in combination with any of the following options: +ipv6. +.sp + Force DNS resolution of following host names on the command line + to the IPv4 namespace. + _EndOfDoc_; +}; +.sp +flag = { + name = ipv6; + flags-cant = ipv4, prefer; + value = 6; + descrip = "Use only IPv6 addresses for DNS name resolution"; + doc = <<- _EndOfDoc_ + Force DNS resolution of following host names on the command line + to the IPv6 namespace. + _EndOfDoc_; +}; +.sp +flag = { + name = prefer; + flags-cant = ipv4, ipv6; + value = p; + arg-type = keyword; + keyword = 4, 6; + descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either'; + doc = <<- _EndOfDoc_ +Prefer IPv4 or IPv6 (as specified) addresses, but use either. +.TP +.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]float\f[], \f\*[B-Font]\-\-destination\f[]=\f\*[I-Font]float\f[] +Filename on the local system. +.sp +The name to use to store the leapfile on the local system. +$LEAPFILE +.TP +.NOP \f\*[B-Font]\-e\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-expiration\f[]=\f\*[I-Font]string\f[] +Refresh the leapfile this long before it expires. +.sp +Specify how long before expiration the file is to be refreshed +Units are required, e.g. "-e 60 days" Note that larger values +imply more frequent refreshes. +"$PREFETCH" +.TP +.NOP \f\*[B-Font]\-f\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-ntp\-conf\-file\f[]=\f\*[I-Font]string\f[] +Location of the ntp.conf file. +.sp +Specify location of ntp.conf (used to make sure leapfile directive is +present and to default leapfile) +/etc/ntp.conf +.TP +.NOP \f\*[B-Font]\-F\f[], \f\*[B-Font]\-\-force\-update\f[] +Force update of the leapfile. +.sp +Force update even if current file is OK and not close to expiring. +.TP +.NOP \f\*[B-Font]\-\-dont\-wait\f[] +Don't wait for keystroke between plots. +.sp +.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 USAGE +Usage stuff +.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 "Timothe Litt" +.br +.SH "NOTES" +This manual page was \fIAutoGen\fP-erated from the \fBupdate-leap\fP +option definitions. diff --git a/contrib/ntp/scripts/update-leap/update-leap.mdoc.in b/contrib/ntp/scripts/update-leap/update-leap.mdoc.in new file mode 100644 index 0000000..9fb3a12 --- /dev/null +++ b/contrib/ntp/scripts/update-leap/update-leap.mdoc.in @@ -0,0 +1,134 @@ +.Dd April 7 2015 +.Dt UPDATE_LEAP 1update-leapmdoc User Commands +.Os +.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc) +.\" +.\" It has been AutoGen-ed April 7, 2015 at 04:21:46 AM by AutoGen 5.18.5pre4 +.\" From the definitions update-leap-opts.def +.\" and the template file agmdoc-cmd.tpl +.Sh NAME +.Nm update-leap +.Nd leap-seconds file manager/updater +.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 validate the file currently on the local system +and if necessary, updates leap\-second definition file. +.Pp +Ordinarily, the file is found using the "leapfile" directive in +.Xr ntp.conf 5 . +However, an alternate location can be specified on the command line. +.Pp +If the file does not exist, is not valid, has expired, or is expiring soon, +a new copy will be downloaded. If the new copy validates, it is installed and +NTP is (optionally) restarted. +.Pp +If the current file is acceptable, no download or restart occurs. +.Pp +-c can also be used to invoke another script to perform administrative +functions, e.g. to copy the file to other local systems. +.PP +This can be run as a cron job. As the file is rarely updated, and leap +seconds are announced at least one month in advance (usually longer), it +need not be run more frequently than about once every three weeks. +.PP +For cron\-friendly behavior, define CRONJOB=1 in the crontab. +.PP +This script depends on$REQUIREDCMDS +.Sh "OPTIONS" +.Bl -tag +.It Fl s Ar string , Fl \-source\-url Ns = Ns Ar string +The URL of the master copy of the leapseconds file. +.sp +Specify the URL of the master copy to download +$LEAPSRC +.It Fl 4 , Fl \-ipv4 +Use only IPv4 addresses for DNS name resolution. +This option must not appear in combination with any of the following options: +ipv6. +.sp + Force DNS resolution of following host names on the command line + to the IPv4 namespace. + _EndOfDoc_; +}; +.sp +flag = { + name = ipv6; + flags\-cant = ipv4, prefer; + value = 6; + descrip = "Use only IPv6 addresses for DNS name resolution"; + doc = <<\- _EndOfDoc_ + Force DNS resolution of following host names on the command line + to the IPv6 namespace. + _EndOfDoc_; +}; +.sp +flag = { + name = prefer; + flags\-cant = ipv4, ipv6; + value = p; + arg\-type = keyword; + keyword = 4, 6; + descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either'; + doc = <<\- _EndOfDoc_ +Prefer IPv4 or IPv6 (as specified) addresses, but use either. +.It Fl d Ar float , Fl \-destination Ns = Ns Ar float +Filename on the local system. +.sp +The name to use to store the leapfile on the local system. +$LEAPFILE +.It Fl e Ar string , Fl \-expiration Ns = Ns Ar string +Refresh the leapfile this long before it expires. +.sp +Specify how long before expiration the file is to be refreshed +Units are required, e.g. "\-e 60 days" Note that larger values +imply more frequent refreshes. +"$PREFETCH" +.It Fl f Ar string , Fl \-ntp\-conf\-file Ns = Ns Ar string +Location of the ntp.conf file. +.sp +Specify location of ntp.conf (used to make sure leapfile directive is +present and to default leapfile) +/etc/ntp.conf +.It Fl F , Fl \-force\-update +Force update of the leapfile. +.sp +Force update even if current file is OK and not close to expiring. +.It Fl \-dont\-wait +Don't wait for keystroke between plots. +.sp +.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 USAGE +Usage stuff +.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 "Timothe Litt" +.Sh "NOTES" +This manual page was \fIAutoGen\fP\-erated from the \fBupdate\-leap\fP +option definitions. diff --git a/contrib/ntp/scripts/update-leap/update-leap.texi b/contrib/ntp/scripts/update-leap/update-leap.texi new file mode 100644 index 0000000..1a96ae0 --- /dev/null +++ b/contrib/ntp/scripts/update-leap/update-leap.texi @@ -0,0 +1,43 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename update-leap.info +@settitle update-leap User's Manual +@include ../../sntp/include/version.texi +@paragraphindent 2 +@c %**end of header + +@ifinfo +This file documents the use of @code{update-leap}, +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 +* update-leap: (update-leap). Check the leapfile and update it if needed. +@end direntry + +@titlepage +@title update-leap User's Manual +@subtitle update-leap, version @value{VERSION}, @value{UPDATED} +@c @author Max @email{foo@ntp.org} +@end titlepage + +@c @page +@c @vskip 0pt plus 1filll + +@node Top, update-leap Description, (dir), (dir) + +This document describes the use of the NTP Project's @code{update-leap} program. + +This document applies to version @value{VERSION} of @code{update-leap}. + +@shortcontents + +@menu +* update-leap Description:: Description +* update-leap Invocation:: Invoking update-leap +@end menu + +@include invoke-update-leap.texi |