mirror of
https://github.com/troglobit/finit.git
synced 2026-10-10 16:52:39 +07:00
Fix #427: make sure first found binary is used as external getty
When using Finit with an external getty that supports alternative login
program argument, the tty_parse_args() function did not check if a getty
command had already been registered:
tty [12345] /sbin/agetty -L -l /bin/login console noclear
This caused Finit to try /bin/login as the getty program.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -172,7 +172,7 @@ int tty_parse_args(struct tty *tty, char *cmd, char **args)
|
||||
passenv = 1;
|
||||
else if (!strcmp(cmd, "rescue"))
|
||||
tty->rescue = 1; /* for rescue shells */
|
||||
else if (whichp(cmd)) /* in $PATH? */
|
||||
else if (!tty->cmd && whichp(cmd))
|
||||
tty->cmd = cmd;
|
||||
else
|
||||
tty->args[tty->num++] = cmd;
|
||||
|
||||
Reference in New Issue
Block a user