]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
agetty: Allow --init-string on a virtual console
authorIvan Mironov <mironov.ivan@gmail.com>
Mon, 1 Feb 2021 16:58:27 +0000 (21:58 +0500)
committerIvan Mironov <mironov.ivan@gmail.com>
Mon, 1 Feb 2021 19:29:25 +0000 (00:29 +0500)
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 <mironov.ivan@gmail.com>
term-utils/agetty.c

index cf3c57b5dadc850b43da50734d403cd360b16030..a48998c16bf71109510e0b8ba9d7991a45dc5cf3 100644 (file)
@@ -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,