Date: Sun, 1 Jul 2007 22:26:00 +0930 From: Robert Archer <freebsd@deathbeforedecaf.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/114191: [patch] net/openntpd should use syslog facility LOG_NTP Message-ID: <20070701125601.NWNT23012.oaamta07sl.mx.bigpond.com@mail.0x7e.net> Resent-Message-ID: <200707011520.l61FK3Tn040075@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 114191 >Category: ports >Synopsis: [patch] net/openntpd should use syslog facility LOG_NTP >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Jul 01 15:20:03 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Robert Archer <freebsd@deathbeforedecaf.net> >Release: FreeBSD 6.2-RELEASE i386 >Organization: >Environment: System: FreeBSD tak.0x7e.net 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: The FreeBSD ntpd(8) daemon logs to the LOG_NTP facility. Users who replace this daemon with the openntpd port might expect the same behaviour. As OpenNTPD is developed by the OpenBSD project, where syslog(3) does not include LOG_NTP, their daemon uses the LOG_DAEMON facility. These logs are faily verbose: Jun 29 20:42:27 irk ntpd[719]: ntp engine ready Jun 29 20:42:44 irk ntpd[719]: peer 10.10.10.2 now valid Jun 29 20:43:39 irk ntpd[718]: adjusting local clock by 1.180681s Jun 29 20:45:48 irk ntpd[718]: adjusting local clock by 1.180783s Jun 29 20:46:22 irk ntpd[718]: adjusting local clock by 0.786388s Jun 29 20:50:42 irk ntpd[718]: adjusting local clock by 0.668906s Jun 29 20:55:06 irk ntpd[718]: adjusting local clock by 0.606314s Jun 29 20:57:13 irk ntpd[718]: adjusting local clock by 0.491739s Jun 29 21:00:26 irk ntpd[718]: adjusting local clock by 0.373368s Jun 29 21:04:15 irk ntpd[718]: adjusting local clock by 0.241557s Jun 29 21:12:01 irk ntpd[718]: adjusting local clock by 0.138065s Jun 29 21:37:28 irk ntpd[718]: adjusting local clock by -0.134400s It would be preferable for these logs to end up in the same place as other NTP messages. >How-To-Repeat: 1. Configure syslogd(8) to send NTP messages to their own logfile 2. Install and start openntpd 3. Wonder why the logfile is empty >Fix: This patch changes the default syslog facility to LOG_NTP. Users who prefer the current behaviour can build the port with SYSLOG_FACILITY=LOG_DAEMON --- Makefile.2007-07-01 Mon May 15 04:44:34 2006 +++ Makefile Sun Jul 1 20:57:27 2007 @@ -7,6 +7,7 @@ PORTNAME= openntpd PORTVERSION= 3.9p1 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= net MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/ \ @@ -22,7 +23,11 @@ MAN5= ntpd.conf.5 MAN8= ntpd.8 +SYSLOG_FACILITY?= LOG_NTP + pre-build: + ${REINPLACE_CMD} -e 's,LOG_DAEMON,${SYSLOG_FACILITY},' \ + ${WRKSRC}/log.c ${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \ ${WRKSRC}/ntpd.conf.5 ${WRKSRC}/ntpd.8 @${SED} -e 's:%%PREFIX%%:${PREFIX}:g' \ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070701125601.NWNT23012.oaamta07sl.mx.bigpond.com>