diff options
author | gordon <gordon@FreeBSD.org> | 2002-09-06 16:18:05 +0000 |
---|---|---|
committer | gordon <gordon@FreeBSD.org> | 2002-09-06 16:18:05 +0000 |
commit | a7f04bb2b79fce3619508825b96c5564b044a9cf (patch) | |
tree | 5bf37a1aebd8c46b4ce8523e594efce97ad8ee38 /etc/rc.d/motd | |
parent | 390d72be15b0b886ecec8a4ce9879fadaa97f9a9 (diff) | |
download | FreeBSD-src-a7f04bb2b79fce3619508825b96c5564b044a9cf.zip FreeBSD-src-a7f04bb2b79fce3619508825b96c5564b044a9cf.tar.gz |
Convert from `${CMD_OSTYPE}` to ${OSTYPE}. This saves a shell invocation on
OS-dependent case switches.
Diffstat (limited to 'etc/rc.d/motd')
-rwxr-xr-x | etc/rc.d/motd | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.d/motd b/etc/rc.d/motd index ca082ca..fbb31f8 100755 --- a/etc/rc.d/motd +++ b/etc/rc.d/motd @@ -16,7 +16,7 @@ rcvar="update_motd" start_cmd="motd_start" stop_cmd=":" -case `${CMD_OSTYPE}` in +case ${OSTYPE} in FreeBSD) T=`mktemp /tmp/_motd.XXXXXX` PERMS="644" @@ -38,7 +38,7 @@ motd_start() install -c -o root -g wheel -m ${PERMS} /dev/null /etc/motd fi - case `${CMD_OSTYPE}` in + case ${OSTYPE} in FreeBSD) uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T} awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> ${T} |