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.8 2004/02/03 05:26:48 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
32 awk 'NR == 1{if ($1 == "DragonFly") {print} else {exit 1}}' < /etc/motd > $T1 && {
35 uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T2}
37 awk '{if (NR == 1) {next} else {print}}' < /etc/motd >> ${T2}
39 chmod ${PERMS} /etc/motd