diff mbox

[OpenWrt-Devel] procd/inittab with a delayed console

Message ID 54AEED81.4090901@exegin.com
State RFC
Headers show

Commit Message

Owen Kirby Jan. 8, 2015, 8:50 p.m. UTC
Hi,

I'm not sure if this is a bug with procd's implementation of inittab or 
if I'm just doing something wrong in my inittab. However, we have a 
board that has multiple serial console ports, one of which relies on a 
kernel module and procd refuses to start a console on the second port. 
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 
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 
sure if this is would be the entire fix for the problem since it seems 
like fork_worker() should be a little more graceful in handling tty 
devices that don't exist yet.

Any thoughts or suggestions on better ways to fix this?

Thanks,
Owen

--
diff mbox

Patch

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->id) || (console && !strcmp(console, a->id))) {
+       if (console && !strcmp(console, a->id)) {
                 DEBUG(4, "Skipping %s\n", a->id);
                 return;
         }