Re: Print a message to all terminals at boot



On Wed, Feb 29, 2012 at 10:45 PM, Jason Heeris <jason.heeris@xxxxxxxxx> wrote:

I have a Debian Squeeze system that exposes a terminal on the serial
line (ttyS0) and the usual tty ones. I would like to print a message
at the very end of the boot sequence, but before any user logs in (the
message is a diagnostic that may affect whether the user logs in at
all).

If I put, say, echo "Message" in /etc/rc.local, it only shows up on
the serial console. How can I print a message to all consoles?

"rc.local" will only display an "echo..." on the console.

If you want a message displayed pre-login:

If it's static, you can add it to "/etc/issue".

If it's dynamic (e.g. "ifconfig lo"), you can add it to
"/etc/rc.local" but use "ifconfig lo > ttyX" but the message won't
display before ssh sessions.

If you want a message displayed post-login:

You can append it to "/var/run/motd" in "/etc/init.d/bootlogs" or
"/etc/rc.local".


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/CAOdo=Szgms=PDpNRdnQc90LmHR=szUEG7KW=EdrX_=wBYW+Eog@xxxxxxxxxxxxxx