From owner-freebsd-current@FreeBSD.ORG Mon Apr 28 23:10:14 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 73A7337B401; Mon, 28 Apr 2003 23:10:13 -0700 (PDT) Received: from madlen.mts.ru (madlen.mts.ru [212.44.140.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A0C043F93; Mon, 28 Apr 2003 23:10:11 -0700 (PDT) (envelope-from tiamat@komi.mts.ru) Received: from cache.inside.mts.ru ([192.168.10.3]) by madlen.mts.ru (8.10.2+Sun/8.11.6) with SMTP id h3T6AAs14314; Tue, 29 Apr 2003 10:10:10 +0400 (MSD) Received: from stella.komi.mts.ru ([10.50.1.1]) by cache.inside.mts.ru (NAVGW 2.5.2.12) with SMTP id M2003042910100611604 ; Tue, 29 Apr 2003 10:10:08 +0400 Received: from nbdav (nb-dav.komi.mts.ru [10.50.1.185]) (user=tiamat mech=NTLM bits=0) by stella.komi.mts.ru (MTS Komi/Smtp) with ESMTP id h3T6A3mZ004917; Tue, 29 Apr 2003 10:10:03 +0400 (MSD) (envelope-from tiamat@komi.mts.ru) Message-ID: <000b01c30e15$ecf66a60$b901320a@komi.mts.ru> From: "Alex Deiter" To: References: <20030426154030.M13476@znfgre.qbhto.arg> Date: Tue, 29 Apr 2003 10:09:42 +0400 Organization: MTS Komi MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: freebsd-current@freebsd.org Subject: Re: Removal of the old rc system from -current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2003 06:10:15 -0000 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!