Re: Why is /dev/console linked to /dev/tty0?
In article <cistron.87emdhdjea.fsf@ashwork.marquardt-home.de>,
Colin Marquardt <colin.marquardt@gmx.de> wrote:
>recently, I wanted to use an Eterm as a substitute for
>xconsole. Eterm -C lets it listen to /dev/console.
>On Debian systems, however, /dev/console is linked to /dev/tty0:
>
> lrwxrwxrwx 1 root root 4 Apr 7 1999 /dev/console -> tty0
Yes, this is standard on all distributions that ship with a 2.0.x
kernel like Debian does.
>so *Eterm doesn't catch anything*. xconsole, OTOH, displays fine what
>I'm echoing to /dev/console.
Then there is a bug in Eterm. Or you are trying to let multiple
programs catch the output of /dev/console - TIOCCONS (the mechanism
that provides "console output cloning to ptys") can only redirect
to ONE pty at the time.
>To prevent suggestions in the wrong direction: no, I'm not using
>syslogd for these messages. I just do things like
>
> echo "Running exim..." > /dev/console
>
>in my /etc/ppp/ip-up.d/ scripts.
>
>Both using syslogd or removing this link to /dev/tty0 seem like
>cowardice to me.
>
>Why is this link done anyway? This is Debian specific, AFAIK.
>How could I fix this cleanly?
There is nothing to fix. The link from /dev/console to /dev/tty0
is standard in all distributions. Only with 2.2.x kernels did
/dev/console get its own major/minor device, c 5 1. Using that
with 2.0.x kernels won't work at all.
Mike.
--
First things first, but not necessarily in that order.
Reply to: