summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-04-22 23:04:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-04-22 23:04:58 +0000
commita71a5b142c4ac48278eed8c369507c7f075fb3cf (patch)
treeae55542e987df3948420d684a8cde33c496a645c /etc
parent472b65f8cd68fdba2224a988cb0ed8a3386d677f (diff)
move motd generation to avoid user races; kashmir@umiacs.umd.edu
Diffstat (limited to 'etc')
-rw-r--r--etc/rc26
1 files changed, 13 insertions, 13 deletions
diff --git a/etc/rc b/etc/rc
index 805a81463fb..349a7b8ca37 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.33 1997/04/16 05:48:27 millert Exp $
+# $OpenBSD: rc,v 1.34 1997/04/22 23:04:57 deraadt Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -208,6 +208,18 @@ if [ X${securelevel} != X"" ]; then
sysctl -w kern.securelevel=${securelevel}
fi
+# patch /etc/motd
+if [ ! -f /etc/motd ]; then
+ install -c -o root -g wheel -m 664 /dev/null /etc/motd
+fi
+T=/tmp/_motd
+rm -f $T
+sysctl -n kern.version | sed 1q > $T
+echo "" >> $T
+sed '1,/^$/d' < /etc/motd >> $T
+cmp -s $T /etc/motd || cp $T /etc/motd
+rm -f $T
+
virecovery=/var/tmp/vi.recover/recover.*
if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
echo preserving editor files
@@ -305,18 +317,6 @@ if [ -f /sbin/kbd -a -f /etc/kbdtype ]; then
kbd `cat /etc/kbdtype`
fi
-# patch /etc/motd
-if [ ! -f /etc/motd ]; then
- install -c -o root -g wheel -m 664 /dev/null /etc/motd
-fi
-T=/tmp/_motd
-rm -f $T
-sysctl -n kern.version | sed 1q > $T
-echo "" >> $T
-sed '1,/^$/d' < /etc/motd >> $T
-cmp -s $T /etc/motd || cp $T /etc/motd
-rm -f $T
-
if [ -f /sbin/ldconfig ]; then
echo 'creating runtime link editor directory cache.'
_LIBS=