On Wed, Dec 28, 2011 at 12:40 AM, Rod Nussbaumer <[email protected]> wrote: > I have a setup that uses busybox as the init process. It works fine, and > is configured to spawn/respawn a getty on ttyS0. Sometimes, however, I > would prefer to cancel the getty process on the serial port, in order to > use the serial port for other purposes, such as setting up a C-kermit > connection on the port. Ideally, I'd like to then restart the getty > respawning when I'm done with the port. > > How can I do this without modifying inittab and rebooting?
If you need this kind of finer control of starting/stopping of services, use runsvdir tool instead of init. For an example, download busybox tarball and look into examples/var_service/ directory: * README file explains how to start runsvdir on /var/service at boot. * getty_tty1/ directory contains an example how to run a getty under runsvdir. If you want to run several, you just need to make copies of this dir: getty_tty2, getty_ttyS0 etc. Then, stopping/starting of a service is trivially easy: sv d /var/service/getty_tty1 sv u /var/service/getty_tty1 -- vda _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
