update-leap User’s Manual

Previous: , Up: (dir)  

Top

This document describes the use of the NTP Project’s update-leap program.

This document applies to version 4.2.8p9 of update-leap.

Short Table of Contents

  • 1 Invoking update-leap

  • Up: Top  

    1 Invoking update-leap

    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 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 AutoGen, using the agtexi-cmd template and the option descriptions for the update-leap program.


    Next: , Up: update-leap Invocation  

    1.1 update-leap help/usage (--help)

    This is the automatically generated usage text for update-leap.

    The text printed is the same whether selected with the help option (--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is used to select the program, defaulting to more. Both will exit with a status code of 0.

        update-leap
            Usage: $0 [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 -d Specify
            the filename on the local system $LEAPFILE -e Specify how long (in
            days) before expiration the file is to be refreshed. 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. -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
    
            The following options are not (yet) implemented in the perl version:
            -4 Use only IPv4 -6 Use only IPv6 -c Command to restart NTP after
            installing a new file <none> - ntpd checks file daily -p 4|6 Prefer
            IPv4 or IPv6 (as specified) addresses, but use either -z Specify
            path for utilities $PATHLIST -Z Only use system path
    
            $0 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.
    
            Version $VERSION
    

    Next: , Previous: , Up: update-leap Invocation  

    1.2 source-url option (-s)

    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


    Next: , Previous: , Up: update-leap Invocation  

    1.3 ipv4 option (-4)

    This is the “use only ipv4 addresses for dns name resolution” option.

    This option has some usage constraints. It:

    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.


    Next: , Previous: , Up: update-leap Invocation  

    1.4 destination option (-d)

    This is the “filename on the local system” option. This option takes a string argument float. The name to use to store the leapfile on the local system. $LEAPFILE


    Next: , Previous: , Up: update-leap Invocation  

    1.5 expiration option (-e)

    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"


    Next: , Previous: , Up: update-leap Invocation  

    1.6 ntp-conf-file option (-f)

    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


    Next: , Previous: , Up: update-leap Invocation  

    1.7 force-update option (-F)

    This is the “force update of the leapfile” option. Force update even if current file is OK and not close to expiring.


    Next: , Previous: , Up: update-leap Invocation  

    1.8 update-leap exit status

    One of the following exit values will be returned:

    0 (EXIT_SUCCESS)

    Successful program execution.

    1 (EXIT_FAILURE)

    The operation failed or the command syntax was not valid.


    Next: , Previous: , Up: update-leap Invocation  

    1.9 update-leap Usage


    Previous: , Up: update-leap Invocation  

    1.10 update-leap Authors