The '-/bin/sh' permanently restarts
Denys Vlasenko
vda.linux at googlemail.com
Sun Nov 1 00:52:28 UTC 2009
On Thursday 29 October 2009 15:55, ladislav klenovic wrote:
> As Detlef said I don't know have to specify that in inittab thus I run the
> shell regardless whether there is or not a debug console.
> I choose the tty0 according to busybox 1.2.2 which works fine for me. So
> maybe some kind of configuration option which could
> specify which device to use if no console is available would make sense.
I don't like this. A configuration option is not flehible. It would be a hack.
I proposed a solution, and get no response. This is it:
::respawn:/bin/run_sh_if_tty.sh
where run_sh_if_tty.sh is
#!/bin/sh
while ! tty >/dev/null 2>&1; do sleep 3600; done
exec sh "$@"
In console=ttyS0 case, stdin will be /dev/ttyS0,
"tty" command exits with 0, and you fall into exec sh.
In console= case, stdin will be /dev/null,
"tty" command exits with 1, and you sleep.
Is it ok for you? If not, why?
--
vda
More information about the busybox
mailing list