Name

login-prompt — simple chain-load getty for prompting before login

Synopsis

login-prompt {next-prog}

Description

login-prompt is a chain-loading utility that prompts to standard output, waits for standard input to have data ready, flushes standard input with the tcflush(3) function, and then (if successful) chain loads to next-prog with the execvp(3) function.

next-prog may contain its own command line options, which login-prompt will ignore.

This program is primarily used in TTY login services, but is only necessary therein if next-prog has timeout functionality that cannot be switched off, as is the case for FreeBSD /usr/bin/login. login-prompt effectively delays running that program, and commencing the timeout, until the user has responded to a prompt. This prevents login processes that timeout from continually respawning on unused terminals.

This can be used as a means to defer running a login program until a user has actually presssed Enter on a terminal.

login-prompt expects the terminal and the line discipline to be in relatively sane states. To reset to these states, run vc-reset-tty(1) or reset(1) before login-prompt.

Author

Jonathan de Boyne Pollard