summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/motd
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.d/motd')
-rwxr-xr-xetc/rc.d/motd5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/rc.d/motd b/etc/rc.d/motd
index f000364..9032539 100755
--- a/etc/rc.d/motd
+++ b/etc/rc.d/motd
@@ -1,10 +1,11 @@
#!/bin/sh
#
-# $NetBSD: motd,v 1.5 2000/09/19 13:04:38 lukem Exp $
+# $NetBSD: motd,v 1.7 2001/04/25 23:23:37 lukem Exp $
#
# PROVIDE: motd
# REQUIRE: mountcritremote
+# BEFORE: LOGIN
. /etc/rc.subr
@@ -23,11 +24,13 @@ motd_start()
if [ ! -f /etc/motd ]; then
install -c -o root -g wheel -m 664 /dev/null /etc/motd
fi
+ ( umask 022
T=/etc/_motd
sysctl -n kern.version | while read i; do echo $i; break; done > $T
sed '1{/^NetBSD.*/{d;};};' < /etc/motd >> $T
cmp -s $T /etc/motd || cp $T /etc/motd
rm -f $T
+ )
}
load_rc_config $name
OpenPOWER on IntegriCloud