Date: Tue, 29 Apr 2003 10:09:42 +0400 From: "Alex Deiter" <tiamat@komi.mts.ru> To: <DougB@freebsd.org> Cc: freebsd-current@freebsd.org Subject: Re: Removal of the old rc system from -current Message-ID: <000b01c30e15$ecf66a60$b901320a@komi.mts.ru> References: <20030426154030.M13476@znfgre.qbhto.arg>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi!
If set update_motd="NO" in /etc/rc.conf, /etc/rc.d/motd at startup will
create temporary files /tmp /_ motd. XXXXXX and will not delete them:
# ls /tmp/_motd.*
/tmp/_motd.6C5YRQ       /tmp/_motd.Gb6IIi       /tmp/_motd.URV3yf
/tmp/_motd.7O6sDC       /tmp/_motd.Lzv09F       /tmp/_motd.XLozpz
/tmp/_motd.CdUKGg       /tmp/_motd.NaV9qF       /tmp/_motd.c9bdjx
/tmp/_motd.Fl1wMP       /tmp/_motd.RZxURw       /tmp/_motd.hAaqLS
It can be corrected if to transfer T=`mktemp /tmp/_motd.XXXXXX` to function
motd_start():
--- /etc/rc.d/motd Wed Apr 23 09:12:52 2003
+++ /usr/src/etc/rc.d/motd Tue Apr 29 10:01:38 2003
@@ -18,7 +18,6 @@
 case ${OSTYPE} in
 FreeBSD)
- T=`mktemp /tmp/_motd.XXXXXX`
  PERMS="644"
  ;;
 NetBSD)
@@ -40,6 +39,7 @@
  case ${OSTYPE} in
  FreeBSD)
+  T=`mktemp /tmp/_motd.XXXXXX`
   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}
   ;;
Thanks!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000b01c30e15$ecf66a60$b901320a>
