procd: Use /dev/console for serial console if exists
[project/procd.git] / inittab.c
index 2c2270cf68d367bcb882e0467d2bfd2456111daa..b2ffc9a25e5fc69aa6a581002331c3ab93c1cc3f 100644 (file)
--- a/inittab.c
+++ b/inittab.c
@@ -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, ',');