NetBSD Problem Report #684
From gnats Tue Jan 3 00:35:26 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id AAA20756 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Tue, 3 Jan 1995 00:35:25 -0800
Message-Id: <199501030837.AAA10033@gandalf.sigmasoft.com>
Date: Tue, 3 Jan 1995 00:37:19 -0800
From: Thorsten Lockert <tholo@SigmaSoft.COM>
Reply-To: tholo@SigmaSoft.COM
To: gnats-bugs@NetBSD.ORG
Subject: newsyslog(1) adds entries to the logs which have slightly different format than syslog
X-Send-Pr-Version: 3.2
>Number: 684
>Category: bin
>Synopsis: newsyslog(1) adds entries to the logs which have slightly different format than syslog
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 03 00:50:03 +0000 1995
>Closed-Date: Thu Jan 12 16:22:45 +0000 1995
>Last-Modified:
>Originator: Thorsten Lockert
>Release: 1.0
>Organization:
SigmaSoft, Th. Lockert
>Environment:
System: NetBSD gandalf.sigmasoft.com 1.0 NetBSD 1.0 (GANDALF) #2: Sat Dec 10 15:37:24 PST 1994 root@:/usr/src/sys/arch/i386/compile/GANDALF i386
>Description:
newsyslog(1) adds entries to both the old and new logfiles when
rotating them (provided they are not binary files).
However, the entries differ slightly from those added by syslogd(8)
in that they give the weekday and the domain of the local host.
>How-To-Repeat:
Look at eg. /var/log/messages and /var/log/messages.0.gz
>Fix:
Apply the following patch to /usr/src/usr.bin/newsyslog/newsyslog.c:
--- newsyslog.c.orig Sun Feb 20 01:54:45 1994
+++ newsyslog.c Mon Jan 2 23:51:56 1995
@@ -177,7 +177,7 @@
progname = argv[0];
timenow = time((time_t *) 0);
- daytime = ctime(&timenow);
+ daytime = ctime(&timenow) + 4;
daytime[strlen(daytime)-1] = '\0';
/* Let's find the pid of syslogd */
@@ -193,6 +193,12 @@
perror("gethostname");
(void) strcpy(hostname,"Mystery Host");
}
+ else {
+ char *p = index(hostname, '.');
+
+ if (p)
+ *p = '\0';
+ }
optind = 1; /* Start options parsing */
while ((c=getopt(argc,argv,"nrvf:t:")) != EOF)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: jtc
State-Changed-When: Thu Jan 12 16:22:45 1995
State-Changed-Why:
Applied slightly different patch.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.