|
|
| version 1.6, 2004/02/01 03:32:08 | version 1.7, 2004/02/03 04:50:47 |
|---|---|
| Line 28 motd_start() | Line 28 motd_start() |
| if [ ! -f /etc/motd ]; then | if [ ! -f /etc/motd ]; then |
| install -c -o root -g wheel -m ${PERMS} /dev/null /etc/motd | install -c -o root -g wheel -m ${PERMS} /dev/null /etc/motd |
| fi | fi |
| T1='mktem -t motd' | T1=`mktemp -t motd` |
| awk 'NR == 1{if ($1 == "DragonFly") {print} else {exit 1}}' < /etc/motd > $t1 && { | awk 'NR == 1{if ($1 == "DragonFly") {print} else {exit 1}}' < /etc/motd > $T1 && { |
| T2=`mktemp -t motd` | T2=`mktemp -t motd` |
| uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T2} | uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T2} |
| Line 40 motd_start() | Line 40 motd_start() |
| rm -f $T2 | rm -f $T2 |
| } | } |
| } | } |
| rm -f $T | rm -f $T1 |
| } | } |
| load_rc_config $name | load_rc_config $name |
| run_rc_command "$1" | run_rc_command "$1" |