From: Ivan Mironov Date: Mon, 1 Feb 2021 16:58:27 +0000 (+0500) Subject: agetty: Allow --init-string on a virtual console X-Git-Tag: v2.37-rc1~147 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5df455dbbc3454f83241122d4ebffdee7d39fdbc;p=thirdparty%2Futil-linux.git 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 --- 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,