3 # $NetBSD: motd,v 1.5 2000/09/19 13:04:38 lukem Exp $
4 # $FreeBSD: src/etc/rc.d/motd,v 1.6 2003/06/30 22:06:26 mtm Exp $
5 # $DragonFly: src/etc/rc.d/motd,v 1.5 2004/01/27 00:42:45 rob Exp $
9 # REQUIRE: mountcritremote
17 start_cmd="motd_start"
23 # Update kernel info in /etc/motd
24 # Must be done *before* interactive logins are possible
25 # to prevent possible race conditions.
28 if [ ! -f /etc/motd ]; then
29 install -c -o root -g wheel -m ${PERMS} /dev/null /etc/motd
33 uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T}
34 awk '{if (NR == 1) {if ($1 == "DragonFly") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> ${T}
35 cmp -s $T /etc/motd || {
37 chmod ${PERMS} /etc/motd