[PATCH] init cleanup - request for testing

Denis Vlasenko vda.linux at googlemail.com
Sat Feb 17 14:35:58 PST 2007


On Saturday 17 February 2007 21:33, akennedy at techmoninc.com wrote:
> > We should fix init's crazy handling of console and stdio fd's first
> > (see my earlier mail today). Not too hard, I just need people who
> > are willing to test changes.
> 
> I'll do some testing for you.  I can at least test the serial stuff ;).

Wow, nice.

Attached patch is a first step in making init's handling
of console simpler and hopefully saner.

We do not close fd 0,1,2 up-front and don't try to painfully discover
the name of console device - because we don't need to. It is
_already_ open_ for us!

open_new_terminal() now recognizes a special case of empty
tty name which means "just use existing fd 0".

log_console is retained - there can be users of that feature.
On serial lines, log_console is automatically redirected
to fd #2 (old code was trying to find the name of console,
open console again, yadda, yadda... it's all gone.
fd #2 _is_ the console).

On Friday 16 February 2007 23:45, Natanael Copa wrote:
> The current problem is, that even if console goes to serial port so I
> can see the kernel messages and bootscript output, busybox init will
> never give a login from inittab unless the previous line is there.

I did not test it, but maybe

::respawn:/sbin/getty - 115200 vt100

already works: i.e. starts a getty on /dev/tty1 or on /dev/ttyS0,
depending on kernel's command line.

Please test whether that works and whether such getty
is able to obtain controlling tty.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2.patch
Type: text/x-diff
Size: 22138 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20070217/db70e013/attachment.bin 


More information about the busybox mailing list