NetBSD Problem Report #411

From gnats  Fri Aug 12 00:12:29 1994
Received: from gandalf.bbb.no (root@gandalf.bbb.no [193.156.26.194]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id AAA16109 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Fri, 12 Aug 1994 00:12:07 -0700
Message-Id: <199408120712.JAA09112@gandalf.bbb.no>
Date: Fri, 12 Aug 1994 09:12:24 +0200
From: Thorsten Lockert <tholo@SigmaSoft.COM>
Reply-To: tholo@SigmaSoft.COM
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: rc.local always changes time stamp of motd
X-Send-Pr-Version: 3.2

>Number:         411
>Category:       bin
>Synopsis:       rc.local always changes time stamp of motd
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 12 00:20:05 +0000 1994
>Closed-Date:    Wed Aug 24 05:08:29 +0000 1994
>Last-Modified:  
>Originator:     Thorsten Lockert
>Release:        current
>Organization:
SigmaSoft, Th. Lockert
>Environment:
System: NetBSD gandalf.bbb.no 1.0-ALPHA NetBSD 1.0-ALPHA (GANDALF) #2: Sun Jul 24 18:47:54 MET DST 1994 tholo@gandalf.bbb.no:/usr/src/sys/arch/i386/compile/GANDALF i386


>Description:
	Having user programs only display /etc/motd if it has been changed
	since last time it was displayed works fine, unless you reboot. Then
	the time stamp on /etc/motd is changed, even if the contents are
	exactly the same (ie. no new kernel has been installed etc).

>How-To-Repeat:
	Check time stamp of /etc/motd.  Reboot.  Check time stamp again.

>Fix:
	Apply following patch.

--- rc.local.old	Fri Aug 12 09:04:55 1994
+++ rc.local		Fri Aug 12 09:05:41 1994
@@ -13,8 +13,12 @@
 sysctl -n kern.version | sed 1q > $T
 echo "" >> $T
 sed '1,/^$/d' < /etc/motd >> $T
-cp $T /etc/motd
-rm -f $T
+if cmp -s $T /etc/motd; then
+	rm -f $T
+else
+	cp $T /etc/motd
+	rm -f $T
+fi

 echo -n 'starting local daemons:'


	There was some consensus that the supplied patch was not a significant
	win for the standard distribution, and should not be done.  I
	personally consider the argument bogus, but not enough to argue about.
	I have added a comment with a suggested change (different from the
	above) for people who care.  - mycroft

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Tue Aug 23 22:08:29 PDT 1994 
State-Changed-Why:  
Patch rejected, with further comments. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.