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



Relevant Pages

  • Print a message to all terminals at boot
    ... line and the usual tty ones. ... at the very end of the boot sequence, but before any user logs in (the ... the serial console. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Init single and Serial console : How to ?
    ... Attempting to kill init ... >> related to presenting the login on the serial console. ... > To unsubscribe from this list: ... > Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: Strange boot-time hang (long, sorry)
    ... I am having difficulty diagnosing a strange boot-time hang on ... You are probably referring to an error message similar to ... The serial console is implicated ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Global startup file?
    ... I have put debugging code in here and found the exact section that is causing the output. ... I have just installed Java 1.5 on my FC3 system and now every time any user logs in there is a whole stream of statements like: ... Andoni OConchubhair. ... To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list ...
    (Fedora)
  • Re: security (malware) issues in Linux bases OSes
    ... what is an auto start folder in relation to Debian or Ubuntu? ... user logs in or perhaps put in a crobtab entry for the user. ... Does .bashrc execute from within gdm, or only when you open a terminal window? ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)