diff options
author | Gaurav Pathak <gaurav.pathak@pantacor.com> | 2021-05-05 17:02:45 +0530 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-05-05 13:11:53 +0100 |
commit | 021ece84de430fca988acd6934f6046ea59d8c37 (patch) | |
tree | 112bcb76149873dbd188f13b18a0d031fb886042 /inittab.c | |
parent | 7ee456346baca29af40a6d1a5071e57f32ebf762 (diff) | |
download | procd-021ece84de430fca988acd6934f6046ea59d8c37.tar.gz |
procd: Use /dev/console for serial console if exists
inittab.c: Use "/dev/console" if it is present, before trying
"/sys/class/tty/console/active" in case if console kernel command
line is not provided during boot and to allow container environment
to use it as login PTY console.
Signed-off-by: Gaurav Pathak <gaurav.pathak@pantacor.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'inittab.c')
-rw-r--r-- | inittab.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -190,7 +190,10 @@ static void askconsole(struct init_action *a) */ tty = get_cmdline_val("console", line, sizeof(line)); if (tty == NULL) { - tty = get_active_console(line, sizeof(line)); + if (dev_exist("console")) + tty = "console"; + else + tty = get_active_console(line, sizeof(line)); } if (tty != NULL) { split = strchr(tty, ','); |