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.10 2005/11/19 21:47:32 swildner Exp $
9 # REQUIRE: mountcritremote
16 start_cmd
="motd_start"
22 # Update kernel info in /etc/motd
23 # Must be done *before* interactive logins are possible
24 # to prevent possible race conditions.
27 if [ ! -f /etc
/motd
]; then
28 install -c -o root
-g wheel
-m ${PERMS} /dev
/null
/etc
/motd
31 awk 'NR == 1{if ($1 == "DragonFly") {print} else {exit 1}}' < /etc
/motd
> $T1 && {
34 uname
-v |
sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T2}
36 awk '{if (NR == 1) {next} else {print}}' < /etc
/motd
>> ${T2}
38 chmod ${PERMS} /etc
/motd