fixes:
>Description: The sed script in /etc/rc.local that builds the host/kernel ID line for the message of the day relies on the year not going past 1999. When the year passes 1999, the ID line is malformed. Submitted by: Wolfram Schneider <wosch@cs.tu-berlin.de>
This commit is contained in:
parent
42e9eb2671
commit
6e75e8c4bc
@ -1,12 +1,12 @@
|
||||
#
|
||||
# site-specific startup actions, daemons
|
||||
#
|
||||
# $Id: rc.local,v 1.19 1995/03/30 06:34:46 rgrimes Exp $
|
||||
# $Id: rc.local,v 1.20 1996/08/17 07:15:38 peter Exp $
|
||||
#
|
||||
|
||||
T=/tmp/_motd
|
||||
rm -f $T
|
||||
uname -v | sed -e 's,^\([^#]*\) #\(.*199[0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > $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
|
||||
|
Loading…
Reference in New Issue
Block a user