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.
This commit is contained in:
parent
e662eb71b4
commit
c438e69177
@ -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 @@ motd_start()
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user