From e0df755dbdf2c3c548421442688ba03a37f75a54 Mon Sep 17 00:00:00 2001 From: ckuethe <> Date: Thu, 30 Nov 2006 18:42:41 +0000 Subject: [PATCH] Allow sensors in a sensors-only configuration to set the time at startup. --- src/usr.sbin/ntpd/ntp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/usr.sbin/ntpd/ntp.c b/src/usr.sbin/ntpd/ntp.c index 6b81c088..7a2c307b 100644 --- a/src/usr.sbin/ntpd/ntp.c +++ b/src/usr.sbin/ntpd/ntp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntp.c,v 1.94 2006/10/27 12:22:41 henning Exp $ */ +/* $OpenBSD: ntp.c,v 1.95 2006/11/30 18:42:41 ckuethe Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -257,6 +257,8 @@ ntp_main(int pipe_prnt[2], struct ntpd_conf *nconf) } sensors_cnt = 0; TAILQ_FOREACH(s, &conf->ntp_sensors, entry) { + if (conf->settime && s->offsets[0].offset) + priv_settime(s->offsets[0].offset); sensors_cnt++; if (s->next > 0 && s->next < nextaction) nextaction = s->next;