From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 8 01:21:49 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98BF6232 for ; Sat, 8 Feb 2014 01:21:49 +0000 (UTC) Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.120]) by mx1.freebsd.org (Postfix) with ESMTP id 4C5821CF3 for ; Sat, 8 Feb 2014 01:21:49 +0000 (UTC) X-Authority-Analysis: v=2.0 cv=H69ZMpki c=1 sm=0 a=s99JP9nkuyUZgdwK7wvnJA==:17 a=CPwA9CjszQEA:10 a=VSm3iadO7nkA:10 a=6lBslN5KadwA:10 a=LEup1id8KFYA:10 a=8nJEP1OIZ-IA:10 a=oX08kPI8AAAA:8 a=KGjhK52YXX0A:10 a=qXmjcyhLpMcA:10 a=6I5d2MoRAAAA:8 a=1cuYtYiAy3PXeY4ck6kA:9 a=wPNLvfGTeEIA:10 a=SV7veod9ZcQA:10 a=4wfsiePOASQA:10 a=BwkfvXdXw-gA:10 a=s99JP9nkuyUZgdwK7wvnJA==:117 X-Cloudmark-Score: 0 X-Authenticated-User: X-Originating-IP: 72.132.160.201 Received: from [72.132.160.201] ([72.132.160.201:18711] helo=bsdfull.Belkin) by cdptpa-oedge04.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 15/E2-11872-5A685F25; Sat, 08 Feb 2014 01:21:41 +0000 Message-ID: <52F586A3.6080404@sdf.org> Date: Fri, 07 Feb 2014 17:21:39 -0800 From: Cary User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:25.0) Gecko/20100101 Firefox/25.0 SeaMonkey/2.22 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Re: remove shutdown messages in console References: <52F05DFC.7070007@freebsd.org> <1D565840-1ADA-4567-85B0-FB4AE771B823@bsdimp.com> In-Reply-To: <1D565840-1ADA-4567-85B0-FB4AE771B823@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Feb 2014 01:21:49 -0000 Warner Losh wrote: > > On Feb 3, 2014, at 8:26 PM, Julian Elischer wrote: > >> On 2/2/14, 6:07 PM, Reza Mirzazadeh wrote: >>> hi . how can i remove shutdown messages in console ? or even print my >>> arbitrary messages in console ? >>> >>> >>> *** FINAL System shutdown message from root@geekiam *** >>> System going down IMMEDIATELY >>> >>> some messages like these ! i don't want it print theses messages >>> -- >>> _______________________________________________ >>> freebsd-hackers@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >>> >> we implimented the consmute sysctl option to "mute" an otherwise configured console for exactly this purpose. >> (and boot messages). > > Except these are different beast. They aren't kernel messages, but generated by userland... > > to get rid of these, hack /etc/syslog.conf to get rid of the *.emerg * line. > Or hack shutdown to stop sending them.... > Or use 'halt' and 'reboot' only > > Warner > > > It was easy to substitute an arbitrary message. I used the following command: # sed 's/System going down IMMEDIATELY/Farewell, Doctor F, until our paths meet yet once more/' /usr/src/sbin/shutdown/shutdown.c >new.shutdown.c then ran "clang -o shutdown new.shutdown.c" . If the file "shutdown" were copied to /sbin would that work as expected? Cary -- cary@sdf.org SDF Public Access UNIX System - http://sdf.org ------------------------------