Commit ce044778 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Return default ntp server to local nodes if no node specific entries

are listed in the ntpinfo table.
parent 510448b7
......@@ -57,6 +57,7 @@
#define DOTSFS ".sfs"
#define RUNASUSER "nobody"
#define RUNASGROUP "nobody"
#define NTPSERVER "ntp1"
#define TESTMODE
#define DEFAULTNETMASK "255.255.255.0"
......@@ -4263,6 +4264,18 @@ COMMAND_PROTOTYPE(dontpinfo)
nrows--;
}
}
else if (reqp->islocal) {
/*
* All local nodes default to a our local ntp server,
* which is typically a CNAME to ops.
*/
OUTPUT(buf, sizeof(buf), "SERVER=%s.%s\n",
NTPSERVER, OURDOMAIN);
client_writeback(sock, buf, strlen(buf), tcp);
if (verbose)
info("NTPINFO: %s", buf);
}
mysql_free_result(res);
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment