From 7cd92321bdeead71e46ed6abfcf4036b05e4d013 Mon Sep 17 00:00:00 2001 From: sheldonh Date: Mon, 21 Jun 1999 15:59:42 +0000 Subject: [PATCH] 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 --- etc/rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/rc b/etc/rc index 9ec7f42aba28..697d3c9542a9 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