From ce0447781a32085640b348cfaa30d478774a26bf Mon Sep 17 00:00:00 2001 From: "Leigh B. Stoller" <stoller@flux.utah.edu> Date: Wed, 22 Dec 2004 01:00:58 +0000 Subject: [PATCH] Return default ntp server to local nodes if no node specific entries are listed in the ntpinfo table. --- tmcd/tmcd.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tmcd/tmcd.c b/tmcd/tmcd.c index 8ee7dfaeb4..10caf1d5a6 100644 --- a/tmcd/tmcd.c +++ b/tmcd/tmcd.c @@ -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); /* -- GitLab