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

Owen Kirby osk at exegin.com
Thu Jan 8 15:50:09 EST 2015


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?


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);
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list