Hi All,

I'm looking for solution how to multiplex console messages to all configured 
kernel consoles.

Lets say that I have set two consoles on kernel command line:
console=ttyS0 console=tty0

Then kernel sends messages to both of them but when rc job with "console 
output" is started
messages appear only on primary console because upstart connects stdout of rc 
job to /dev/console
which is connected only to primary (last) console, in this case tty0.

So how to multiplex messages from jobs to all configured consoles?

Simple solution would be to redirect output of job to /dev/kmsg like:

exec /etc/rc.d/rc $RUNLEVEL > /dev/kmsg 2> /dev/kmsg

But this heads for SELinux AVC messages as some commands in sysvinit scripts 
try to write
to /dev/kmsg (via stdout) only that they are not allowed to do so.

Then I've been thinking about new console stanza target "kmsg" - connect output 
to /dev/kmsg instead of
/dev/console. But there is same selinux issue as above.

So it will probably need some kind of bridge inside upstart which resends all 
output from configured jobs
to all kernel consoles. This will need parse kernel command line, resolve 
primary and other consoles,
read output from jobs configured to send output to console and resend data ...

Is there simpler way? Have you any suggestions, ideas?

Thanks,

Petr
--
Petr Lautrbach, Red Hat, Inc.

--
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to