Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/rc.d if update_motd is set, do not gratuitously force it...



details:   https://anonhg.NetBSD.org/src/rev/b73f34e1454e
branches:  trunk
changeset: 495537:b73f34e1454e
user:      chuck <chuck%NetBSD.org@localhost>
date:      Mon Jul 31 00:17:05 2000 +0000

description:
if update_motd is set, do not gratuitously force it to have an empty line
in it.  also be a bit smarter about deleting stuff from motd during
update.  it is now possible to have a one line motd just like in SunOS.

diffstat:

 etc/rc.d/motd |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 347a424fa86e -r b73f34e1454e etc/rc.d/motd
--- a/etc/rc.d/motd     Mon Jul 31 00:10:03 2000 +0000
+++ b/etc/rc.d/motd     Mon Jul 31 00:17:05 2000 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: motd,v 1.3 2000/07/26 00:11:49 lukem Exp $
+# $NetBSD: motd,v 1.4 2000/07/31 00:17:05 chuck Exp $
 #
 
 # PROVIDE: motd
@@ -26,8 +26,7 @@
        T=/etc/_motd
        rm -f $T
        sysctl -n kern.version | sed 1q > $T
-       echo "" >> $T
-       sed '1,/^$/d' < /etc/motd >> $T
+       sed '1{/^NetBSD.*/{d;};};' < /etc/motd >> $T
        cmp -s $T /etc/motd || cp $T /etc/motd
        rm -f $T
 }



Home | Main Index | Thread Index | Old Index