summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>1999-06-21 15:59:42 +0000
committersheldonh <sheldonh@FreeBSD.org>1999-06-21 15:59:42 +0000
commit7cd92321bdeead71e46ed6abfcf4036b05e4d013 (patch)
tree6f4b28427355ac47a03981198b079f73f1d5a005 /etc/rc
parent8055b17e857c6c26d1b2e5424eae88fe9b25c031 (diff)
downloadFreeBSD-src-7cd92321bdeead71e46ed6abfcf4036b05e4d013.zip
FreeBSD-src-7cd92321bdeead71e46ed6abfcf4036b05e4d013.tar.gz
Don't allow users to prevent the updating of /etc/motd on machines for
which /tmp is not mounted in MFS, clear_tmp_enable="NO" and update_motd="YES". PR: 10005 Submitted by: Anton Voronin <anton@urc.ac.ru>
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/rc b/etc/rc
index 9ec7f42..697d3c9 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: rc,v 1.187 1999/04/02 09:35:34 cracauer Exp $
+# $Id: rc,v 1.188 1999/06/01 10:47:53 brian Exp $
# From: @(#)rc 5.27 (Berkeley) 6/5/91
# System startup script run by init on autoboot
@@ -400,12 +400,12 @@ fi
if [ "X${update_motd}" != X"NO" ]; then
T=/tmp/_motd
- rm -f $T
+ rm -rf $T
uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > $T
awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> $T
cp $T /etc/motd
chmod 644 /etc/motd
- rm -f $T
+ rm -rf $T
fi
# Run rc.devfs if present to customify devfs
OpenPOWER on IntegriCloud