From 33dc34f1c7c7f6a87479be9bd4a67eaa972e7b11 Mon Sep 17 00:00:00 2001 From: wvdputte <> Date: Tue, 6 Sep 2005 21:27:10 +0000 Subject: [PATCH] when running ntpd with "-s" as it's argument from /etc/rc.conf, make sure the output goes to syslog and not console by moving around log_init OK henning@, markus@ and mblamer@ --- src/usr.sbin/ntpd/ntpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c index bf384bb7..1c8b2b18 100644 --- a/src/usr.sbin/ntpd/ntpd.c +++ b/src/usr.sbin/ntpd/ntpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.c,v 1.39 2005/07/11 08:08:06 dtucker Exp $ */ +/* $OpenBSD: ntpd.c,v 1.40 2005/09/06 21:27:10 wvdputte Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -275,10 +275,10 @@ dispatch_imsg(struct ntpd_conf *conf) fatalx("invalid IMSG_SETTIME received"); if (!conf->settime) break; + log_init(conf->debug); memcpy(&d, imsg.data, sizeof(d)); ntpd_settime(d); /* daemonize now */ - log_init(conf->debug); if (!conf->debug) if (daemon(1, 0)) fatal("daemon");