From 5df455dbbc3454f83241122d4ebffdee7d39fdbc Mon Sep 17 00:00:00 2001 From: Ivan Mironov Date: Mon, 1 Feb 2021 21:58:27 +0500 Subject: [PATCH] agetty: Allow --init-string on a virtual console This option has valid use cases on virtual consoles. Example: enabling screen blanking in the same way as `setterm --blank ...` does. Signed-off-by: Ivan Mironov --- term-utils/agetty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/term-utils/agetty.c b/term-utils/agetty.c index cf3c57b5da..a48998c16b 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -439,7 +439,7 @@ int main(int argc, char **argv) termio_init(&options, &termios); /* Write the modem init string and DO NOT flush the buffers. */ - if (serial_tty_option(&options, F_INITSTRING) && + if (options.flags & F_INITSTRING && options.initstring && *options.initstring != '\0') { debug("writing init string\n"); write_all(STDOUT_FILENO, options.initstring, -- 2.47.3