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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19151
@ -1,12 +1,12 @@
|
|||||||
#
|
#
|
||||||
# site-specific startup actions, daemons
|
# 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
|
T=/tmp/_motd
|
||||||
rm -f $T
|
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
|
awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> $T
|
||||||
cp $T /etc/motd
|
cp $T /etc/motd
|
||||||
chmod 644 /etc/motd
|
chmod 644 /etc/motd
|
||||||
|
Loading…
Reference in New Issue
Block a user