Control: tags 668728 + moreinfo

On 09/25/2012 01:12 AM, Matt Taggart wrote:
>   if printf "%s" "$param" | egrep -q '^console=ttyS[0-9]+,[0-9]+n8$'; then


this is within a for loop:

 for param in $(cat /proc/cmdline); do
 ...

the result that each element assigned to $param is split from the next
by IFS, which is basic whitespace.

> the egrep regex to detect a serial console is anchored with ^ at the front, 
> assuming that this console entry will be the first thing on the cmdline. 
> This prevents one from doing such things as
> 
> GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"

hm, i don't think it does.  have you verified this?  the anchor tests
against the start of each parameter, not against the start of the entire
/proc/cmdline.

do you have an example of where this actually fails to work?

> makes it so that a getty runs on the first ttyS match on the line which is 
> probably what's wanted (although I suppose someone might list multiple, 
> like a real serial and an ipmi serial, but that would take more enhancing 
> of this module).

fwiw, i think most ipmi serials are also real serial ports on the
mainboard, just exported via another external interface through the ipmi
symbiont device.

while the goal of spawning a getty on each line the kernel has its
console on is an interesting one, i don't think it's particularly
useful.  once we're in the realm of using multiple serial lines, it's
entirely possible that you want the kernel spew on one, a getty on
another, and (who knows) a SLIP connection on the third.  The current
module is a helper to make some default connections work in a standard
and expectable way, not a flexibly-configurable port multiplexer.

while a module to handle port multiplexing in complex ways would be
useful, i think that's an entirely different module than this one, not
an enhancement of it.

i've tagged this moreinfo because i don't see the bug in question, due
to how $param is split out.  Can you help me understand what the problem is?

        --dkg

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to