mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
e0d239dba3
editor safer. The old one was too deadly, if the blank line after the "FreeBSD" version banner was missing, it would delete from the beginning of the file up until the next blank line, possibly to the end of file. This was not good.
20 lines
429 B
Plaintext
20 lines
429 B
Plaintext
#
|
|
# site-specific startup actions, daemons
|
|
#
|
|
# $Id: rc.local,v 1.19 1995/03/30 06:34:46 rgrimes Exp $
|
|
#
|
|
|
|
T=/tmp/_motd
|
|
rm -f $T
|
|
uname -v | sed -e 's,^\([^#]*\) #\(.*199[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 '.'
|