Deleted Added
sdiff udiff text old ( 1.1.1.1 ) new ( 1.1.1.2 )
full compact
1#! @PATH_PERL@ -w
2
3# Copyright (C) 2015 Network Time Foundation
4# Author: Harlan Stenn
5
6# Original shell version:
7# Copyright (C) 2014 Timothe Litt litt at acm dot org
8

--- 20 unchanged lines hidden (view full) ---

29
30my $CRONJOB = $ENV{'CRONJOB'};
31$CRONJOB = "" unless defined($CRONJOB);
32my $LOGGER;
33my $QUIET = "";
34my $VERBOSE = "";
35
36# Where to get the file
37my $LEAPSRC="ftp://time.nist.gov/pub/leap-seconds.list";
38my $LEAPFILE;
39
40# How many times to try to download new file
41my $MAXTRIES=6;
42my $INTERVAL=10;
43
44# Where to find ntp config file
45my $NTPCONF="/etc/ntp.conf";

--- 249 unchanged lines hidden (view full) ---

295
296-r $NTPCONF || die "Missing ntp configuration: $NTPCONF\n";
297
298# Parse ntp.conf for leapfile directive
299
300open(LF, $NTPCONF) || die "Can't open <$NTPCONF>: $!\n";
301while (<LF>) {
302 chomp;
303 if (/^ *leapfile\s+(\S+)/) {
304 $LEAPFILE = $1;
305 }
306}
307close LF;
308
309-s $LEAPFILE || warn "$NTPCONF specifies $LEAPFILE as a leapfile, which is empty.\n";
310
311# Allow placing the file someplace else - testing

--- 113 unchanged lines hidden ---