> Hence all pieces of the puzzle are available to userspace...
> Is there another way?

My hackish way is to parse dmesg, adapt inittab at runtime and make init reload
it. Not exactly production quality, though:

+       l=$(dmesg | sed -n '/console.*enabled/ 
s/.*\[\(tty[A-Z]\+[0-9]\+\)\].*/\1/; T; p; q')
+       sed -i s/ttyS0/$l/g /etc/inittab
+       kill -s SIGHUP 1

Attachment: signature.asc
Description: Digital signature

Reply via email to