From: Frank Kardel Date: Tue, 6 Jun 2006 08:47:18 +0000 (+0000) Subject: ntpdbase-opts.def: X-Git-Tag: NTP_4_2_3P2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6122bcda37f05ad174fd78936451d94a8e08523;p=thirdparty%2Fntp.git ntpdbase-opts.def: add U option for update interval for interface scan cmd_args.c: adjust argument processing to a number bk: 44854116mxwaZFCY_ta4KdsEYvB00A --- diff --git a/ntpd/cmd_args.c b/ntpd/cmd_args.c index c93cd9d76..9f2af3aea 100644 --- a/ntpd/cmd_args.c +++ b/ntpd/cmd_args.c @@ -332,16 +332,16 @@ getCmdOpts( if (HAVE_OPT( SLEW )) clock_max = 600; - if (HAVE_OPT( UPDATEINTERVAL ) { - long val; + if (HAVE_OPT( UPDATEINTERVAL )) { + long val = OPT_VALUE_UPDATEINTERVAL; extern int interface_interval; - if ((1 == sscanf(OPT_ARG( UPDATEINTERVAL ), "%ld", &val)) && ((val >= 60) || (val == 0))) + if ((val >= 60) || (val == 0)) interface_interval = val; else { msyslog(LOG_ERR, - "command line interface update interval %s must be 0 or longer than 60 seconds", - ntp_optarg); + "command line interface update interval %ld must be 0 or longer than 60 seconds", + val); errflg++; } } diff --git a/ntpd/ntpdbase-opts.def b/ntpd/ntpdbase-opts.def index f0aa2a451..4ff7368a3 100644 --- a/ntpd/ntpdbase-opts.def +++ b/ntpd/ntpdbase-opts.def @@ -305,6 +305,19 @@ flag = { _EndOfDoc_; }; +flag = { + name = updateinterval; + value = U; + arg-type = number; + descrip = "interval in seconds between scans for new or dropped interfaces"; + doc = <<- _EndOfDoc_ + Give the time in seconds between two scans for new or dropped interfaces. + For systems with routing socket support the scans will be performed shortly after the interface change + has been detected by the system. + Use 0 to disable scanning. 60 seconds is the minimum time between scans. + _EndOfDoc_; +}; + flag = { name = statsdir; value = s;