On Tuesday 05 July 2011 20:25, Kevin Cernekee wrote: > On Tue, Jul 5, 2011 at 1:53 AM, Gilles <[email protected]> wrote: > >># Startup the system > >>#console::sysinit:/bin/sh /etc/rc > >>#tty::sysinit:/bin/sh /etc/rc > >>ttyBF0::sysinit:/bin/sh /etc/rc > >> > >># Set up a console shell > >>#console::respawn:/bin/login -f root > >>#tty::respawn:/bin/login -f root > >>ttyBF0::respawn:/bin/login -f root > > > > The problem I seem to be having, is that the device nodes are created > > dynamically by mdev, and that point, neither /dev/tty nor /dev/ttyBF0 > > exist, so it fails with the following error message: > > Could you try running /etc/rc on console, and running the login shell > on ttyBF0? e.g. > > ::sysinit:/etc/rc > ttyBF0::respawn:/bin/login -f root > > /etc/rc runs "mdev -s", correct? > > BTW: I maintain a generic rootfs that has to run on a wide variety of > platforms, and not all of them use the same console tty. Other than > the tty configuration, the platform-specific dependencies are minimal > (and can be easily detected at runtime). > > It would be really nice to be able to make my /etc/inittab say something like: > > AUTO::respawn:/bin/login -f root > > and have busybox query the kernel for the first console, then fill in > "AUTO" with the appropriate device name. > > I see that in Linux 2.6.38+, there is a new > /sys/class/tty/console/active attribute that could be used to > implement this. systemd init is already using it to start getty on > the active serial console. > > Any thoughts on whether such a change would be accepted to busybox?
busybox has cttyhack applet for that. Please read its help text. It may be a good idea to teach ctty hack to look at /sys/class/tty/console/active. -- vda _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
