diff options
author | mtm <mtm@FreeBSD.org> | 2003-06-30 22:06:26 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2003-06-30 22:06:26 +0000 |
commit | 016c135dbaefb273571e739224af99fe347262e2 (patch) | |
tree | d7583226bd9d40bd09edf2f59dc7661bbf69729a /etc/rc.d/motd | |
parent | b8db4ad194c9901892b9e4a5b1623013d596e762 (diff) | |
download | FreeBSD-src-016c135dbaefb273571e739224af99fe347262e2.zip FreeBSD-src-016c135dbaefb273571e739224af99fe347262e2.tar.gz |
Have mktemp(1) construct the temporary file name for us instead
of providing a template manually.
Submitted by: Lars Eggert <larse@isi.edu>
Diffstat (limited to 'etc/rc.d/motd')
-rwxr-xr-x | etc/rc.d/motd | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/rc.d/motd b/etc/rc.d/motd index 69ed49e..8368e7c 100755 --- a/etc/rc.d/motd +++ b/etc/rc.d/motd @@ -38,7 +38,7 @@ motd_start() case ${OSTYPE} in FreeBSD) - T=`mktemp /tmp/_motd.XXXXXX` + T=`mktemp -t motd` 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} ;; |