Cancel respawn getty on serial tty

Rod Nussbaumer bomr at triumf.ca
Thu Dec 29 20:27:13 UTC 2011


ralda at gmx.de wrote:
> Hallo Rod!
>
> On Tue, 27 Dec 2011 15:40:34 -0800
> Rod Nussbaumer<bomr at triumf.ca>  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?
>> Thanks.
>

Thanks for the replies, people.

The suggestions include:

1. Using telinit -q   to re-init.

I will have to re-build busybox with this option to try it. I need the 
re-init to not disrupt any of the existing application processes; I hope 
this suggestion works that way.

2. You can just login normal on your ttyS0 and then do an "exec ckermit".

This would work, except the serial port in question is to be connected 
to a device, and my purpose for running C-Kermit (as well as other 
applications) is to talk to the device. I want to run kermit on the host 
with the serial port; perhaps there was some confusion about that.

3. If you need this kind of finer control of starting/stopping
of services, use runsvdir tool instead of init.

This seems to have some merit, and I will explore this option. It seems 
to be a more refined option, although I am a bit reluctant to implement 
something that is somewhat unconventional. Also, it would seem to create 
implications for other stuff that is presently done with init. If it 
wasn't for that, I would probably go immediately to that solution.


Just to add more context to the matter, the setup is that numerous (~ 
30) hosts presently boot the same root initrd image via PXE. Whatever 
change is made must not interfere with applications running on existing 
hosts. The use case I originally described is a kind of off-normal 
situation. Mostly, the hosts will use the serial port for accepting logins.

Thanks.

    ---   rod.




More information about the busybox mailing list