Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 May 2012 14:54:36 +0200
From:      Polytropon <freebsd@edvax.de>
To:        mahdieh salamat <mahdieh.salamat@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: disable console messages
Message-ID:  <20120516145436.84794137.freebsd@edvax.de>
In-Reply-To: <CAL5m1BtS2rAk9EvfuXN8_dMEZAXB9WCRbXqXZABiKLEqsL19yA@mail.gmail.com>
References:  <CAL5m1BtS2rAk9EvfuXN8_dMEZAXB9WCRbXqXZABiKLEqsL19yA@mail.gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Wed, 16 May 2012 00:27:07 -0700, mahdieh salamat wrote:
> hi all. how I can disbale console messages and clear screen on boot?
> Thanks

The console messages can be suppressed by commenting out the
line

	*.err;kern.warning;auth.notice;mail.crit                /dev/console

in /etc/syslog.conf; if you want the messages redirected to
a file (instead of the screen), just provide a different
target, such as

	*.err;kern.*;auth.notice;mail.crit;console.info    /var/log/console.log

Make sure /var/log/console.log does exist: run

	# touch /var/log/console.log

There are more useful examples in that file. See "man 5 syslog.conf"
for details.



To also silence the kernel, you could add

	boot_mute="YES"

or (and?)

	consolse="nullconsole"

to /boot/loader.conf. See "man 8 loader" and "man 5 loader.conf"
and "less /boot/defaults/loader.conf" for details.



Finally:

Add the command "clear" or "/usr/bin/tput clear" at the end of
the /etc/rc script (not very clean, but works).



A quick web search brings up some inspiration:

http://lists.freebsd.org/pipermail/freebsd-questions/2003-October/022911.html
http://forums.freebsd.org/showthread.php?t=10341
http://forums.freebsd.org/showthread.php?p=58256#post58256

You'll find a suggestion there on how to avoid fiddling with
the /etc/rc boot script (which should stay untouched due to
many reasons).



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20120516145436.84794137.freebsd>