conditional inittab
Denys Vlasenko
vda.linux at googlemail.com
Sun May 10 21:50:40 UTC 2009
On Tuesday 05 May 2009 22:32, Guenter wrote:
> Hi all,
> here's what I want to do:
> boot via PXE and have a PXE boot menu where I can select between boot
> with console=vga and console=ttyS0. Now the problem is when the system
> comes up I would need two different entries in inittab: one for normal
> tty1 and one for ttyS0. The prob is that I cant have both entries in
> inittab because then I get permanently error messages on my console like
> 'cant open /dev/ttyX'. For an ash script it seems no prob to determine
> the console from /proc/cmdline, but how can I do such for inittab?
Run a script from inittab which checks for existence of a /dev/xyz:
if it doesn't, sleep forever
if it does, exec getty on it
Perhaps run it by:
null::respawn:/path/to/script /dev/xyz [other params]
> Probably in inittab make a call to an ash script which rewrites inittab
> depending on used console, and then make init somehow re-read inittab?
O M G.
--
vda
More information about the busybox
mailing list