]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ntpdbase-opts.def:
authorFrank Kardel <kardel@ntp.org>
Tue, 6 Jun 2006 08:47:18 +0000 (08:47 +0000)
committerFrank Kardel <kardel@ntp.org>
Tue, 6 Jun 2006 08:47:18 +0000 (08:47 +0000)
  add U option for update interval for
  interface scan
cmd_args.c:
  adjust argument processing to a number

bk: 44854116mxwaZFCY_ta4KdsEYvB00A

ntpd/cmd_args.c
ntpd/ntpdbase-opts.def

index c93cd9d7695f20f84aaf3f48e1519206e0eab5e9..9f2af3aeac2ba01d2ca707db5e38e9e3e22a3905 100644 (file)
@@ -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++;
                }
        }
index f0aa2a4516c7b6760b608510923bd140d9503995..4ff7368a3742520816a41de3470ac9894e8eac09 100644 (file)
@@ -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;