[From nobody Thu Jun 25 05:52:37 2020
X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: from FGG-EU-MMEU ([172.31.0.20]) by ldam-msx2.fugro-nl.local with
 Microsoft SMTPSVC(6.0.3790.4675); Thu, 8 Jan 2015 21:51:15 +0100
MIME-Version: 1.0
Content-Type: text/plain;
	charset=&quot;iso-8859-1&quot;
Content-Transfer-Encoding: quoted-printable
Received: from FGG-EU-FireEye.fugro.com (Not Verified[172.31.0.25]) by
 FGG-EU-MMEU id &lt;B54aeedc00002&gt;; Thu, 08 Jan 2015 20:51:12 +0000
Received: by FGG-EU-FireEye.fugro.com (Postfix, from userid 600) id
 3kJKNc1VmVz3R3Qh; Thu,  8 Jan 2015 20:50:56 +0000 (UTC)
Received: from smtp.eu2.fugro.com (smtp.eu2.fugro [172.31.0.182]) by
 FGG-EU-FireEye.fugro.com (Postfix) with ESMTP id 3kJKNJ0R29z3R3QZ;
 Thu,  8 Jan 2015 20:50:56 +0000 (UTC)
Received: from arrakis.dune.hu ([78.24.191.176]) by smtp.eu2.fugro.com with
 ESMTP/TLS/ADH-AES256-SHA; 08 Jan 2015 20:50:55 +0000
Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu
 (Postfix) with ESMTP id 44684281481; Thu,  8 Jan 2015 21:48:33 +0100 (CET)
Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu
 (Postfix) with ESMTP id 8A54128121B for &lt;openwrt-devel@lists.openwrt.org&gt;;
 Thu,  8 Jan 2015 21:48:25 +0100 (CET)
Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com
 [209.85.220.45]) by arrakis.dune.hu (Postfix) with ESMTPS for
 &lt;openwrt-devel@lists.openwrt.org&gt;; Thu,  8 Jan 2015 21:48:22 +0100 (CET)
Received: by mail-pa0-f45.google.com with SMTP id lf10so13971990pab.4 for
 &lt;openwrt-devel@lists.openwrt.org&gt;; Thu, 08 Jan 2015 12:50:30 -0800 (PST)
Received: from [172.16.16.147] ([184.71.143.130]) by mx.google.com with
 ESMTPSA id sb7sm5170050pbc.54.2015.01.08.12.50.22 (version=TLSv1.2
 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 08 Jan 2015 12:50:29 -0800 (PST)
Content-class: urn:content-classes:message
Subject: [OpenWrt-Devel] procd/inittab with a delayed console
Date: Thu, 8 Jan 2015 21:50:09 +0100
Message-ID: &lt;54AEED81.4090901@exegin.com&gt;
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [OpenWrt-Devel] procd/inittab with a delayed console
Thread-Index: AdArhNhiJRdEaB56Q4GgGl2tGHgfyg==
List-Help: &lt;mailto:openwrt-devel-request@lists.openwrt.org?subject=help&gt;
List-Subscribe: &lt;https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel&gt;,
 &lt;mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe&gt;
List-Unsubscribe: &lt;https://lists.openwrt.org/cgi-bin/mailman/options/openwrt-devel&gt;,
 &lt;mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe&gt;
From: &quot;Owen Kirby&quot; &lt;osk@exegin.com&gt;
Sender: &quot;openwrt-devel&quot; &lt;openwrt-devel-bounces@lists.openwrt.org&gt;
To: &lt;openwrt-devel@lists.openwrt.org&gt;

Hi,

I'm not sure if this is a bug with procd's implementation of inittab or=20
if I'm just doing something wrong in my inittab. However, we have a=20
board that has multiple serial console ports, one of which relies on a=20
kernel module and procd refuses to start a console on the second port.=20
What seems to be happening is that procd loads inittab before the kernel =

modules are loaded, therefore the tty device doesn't exist yet and the=20
check for dev_exist() fails and procd never forks a worker for that =
console.

I was able to fix it for my board with the following patch, but I'm not=20
sure if this is would be the entire fix for the problem since it seems=20
like fork_worker() should be a little more graceful in handling tty=20
devices that don't exist yet.

Any thoughts or suggestions on better ways to fix this?

Thanks,
Owen

diff --git a/inittab.c b/inittab.c
index 2efbf4d..7b12e10 100644
--- a/inittab.c
+++ b/inittab.c
@@ -161,7 +161,7 @@ static void askfirst(struct init_action *a)
  {
         int i;

-       if (!dev_exist(a-&gt;id) || (console &amp;&amp; !strcmp(console, a-&gt;id))) {
+       if (console &amp;&amp; !strcmp(console, a-&gt;id)) {
                 DEBUG(4, &quot;Skipping %s\n&quot;, a-&gt;id);
                 return;
         }
--
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
]