Removal of the old rc system from -current
Alex Deiter
tiamat at komi.mts.ru
Mon Apr 28 23:10:15 PDT 2003
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!
More information about the freebsd-current
mailing list