This patch adds a `nologin` flag to the `tty` configuration directive,
making it possible to set up really simple embedded systems with no
login.
Example, put the following line in `/etc/finit.d/getty.conf` to get
a "Please press Enter to ..." prompt before being presented with a
root shell prompt.
tty [12345] @console noclear nologin
Needless to say, this is not very secure, but can be really useful
for developer setups, during board bringup, or similar.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch relocates the speed parser so that exec.c can set the TTY
speed properly as soon as possible. For external getty we make sure
to not touch the TTY speed.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch makes the Finit built-in getty behave a bit more like other
getty implementations. We now not only disable ISIG but also VEOF and
VINTR when prearing the TTY for the getty (built-in or external).
Like before, it is up to the getty process to leave the TTY in a
usable state to /bin/login, so we also move the stty() call to
just before calling /bin/login in getty.c
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch moves the stty() function from getty.c to a separate file so
it can be called from exec.c as well. The fix to #84 is simply to call
stty() in prepare_tty(), which is shared by run_getty() and run_getty2()
and called before "Please press Enter ...".
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
For some reason PPC is much more sensitive than ARM when it comes to
termios changes. This patch fixes a regression in Ctrl-C handling
after login introduced in 907595d when blocking of Ctrl-C was added
to prevent breaking the login-prompt.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>