Consider a headless device that uses a serial port for console. I configured it so that during bootup all phases can be followed using that serial port. I.e. BIOS, boot loader, kernel and login are configured. The login TTY is configured as per the line below (in inittab):
T0:2345:respawn:/sbin/getty -L ttyS0 38400 vt100
Now, this may sound a bit exotic, but since the serial port is only used for maintenance in case of absent network connectivity, I would like to use that port again. In the particular scenario the port would be used to connect to another headless machine that is less reliable and is stored in the same remote location. This would allow to access the less reliable machine via serial connection remotely (e.g. over SSH).
So, how can I repurpose the ttyS0 (or generally any serial port) after successfully booting into the system? How can I "kill" the respective getty instances (note the respawn) without having to change inittab, which would defeat the whole purpose (because if the system does not come up with network connectivity next time, serial connectivity is essential for "repair").
initdo its job of making sure thegettyis always there, and if you need more serial ports for different purposes, get some cheap USB-to-serial adapters. That being said, if you insist on proceeding, know that you can run thegettycommand from a normal script instead of through init, and therefore control exactly when it does make login available via ttyS0. – ultrasawblade Mar 24 '11 at 1:54gettywithout having to changeinittab? – STATUS_ACCESS_DENIED Mar 24 '11 at 15:32