On Thu, Oct 29, 2009 at 12:22:55PM -0400, Mike Frysinger wrote: >On Thursday 29 October 2009 11:15:02 Denys Vlasenko wrote: >> On Thu, Oct 29, 2009 at 2:40 PM, Detlef Vollmann wrote: >> > My initial reaction was 'just don't use busybox init', >> > but of course that's not always an option. >> >> Maybe check whether stdin is a tty, and only then run sh, >> >> otherwise sleep forever: >> ::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 "$@" > >FAQ it ?
I don't quite get the problem. If you want to run a getty on ttyS0 then why don't you just run it on ttyS0? You wouldn't want to try to periodically spawn a sh on a production machine where you know that there is no console, would you? I suggest you just run a sh on e.g. ttyS0 if you're debugging and turn it off if you're not. My favourite link as a stub: http://repo.or.cz/w/buildroot.git?a=blob_plain;f=target/generic/target_busybox_skeleton/etc/inittab;hb=HEAD HTH, _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
