Date: Fri, 07 Feb 2014 17:21:39 -0800 From: Cary <cary@sdf.org> To: freebsd-hackers@freebsd.org Subject: Re: remove shutdown messages in console Message-ID: <52F586A3.6080404@sdf.org> In-Reply-To: <1D565840-1ADA-4567-85B0-FB4AE771B823@bsdimp.com> References: <CAJCLxb2vYjOqn%2BNiS7nWcjY9Mip-cDbFHN37f6z7BDq9ghzsWQ@mail.gmail.com> <52F05DFC.7070007@freebsd.org> <1D565840-1ADA-4567-85B0-FB4AE771B823@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 ------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52F586A3.6080404>