mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-05 10:09:30 +00:00
6e75e8c4bc
>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>
20 lines
440 B
Plaintext
20 lines
440 B
Plaintext
#
|
|
# site-specific startup actions, daemons
|
|
#
|
|
# $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,^\([^#]*\) #\(.* [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
|
|
|
|
echo -n 'starting local daemons:'
|
|
|
|
# put your local stuff here
|
|
|
|
echo '.'
|