Hi,

thanks a lot for the quick reply. It helped me tracking down the issue as learned that I needed to look for inittab code in procd and that the code is expected to work out of the box.

First my platform seems to be the only target (mpc85xx) that has no console entry in inittab by default in OpenWRT now. This wasn't an issue in the past, as an init.d-Script was fiddling with inittab anyway (to use /bin/login instead of ash) and made init reload it, but it looks like procd cannot handle the HUP signal. Moving this into preinit now avoids the need of the HUP signal.

Next, I was facing issues when starting procd with rdinit=/sbin/procd. The errors are "coldplug failed" and "/proc/kmsg does not exist" (or alike). The console then does not get started either as /dev/ttyS0 does not exist. This can be fixed by running /sbin/procd with basename init. I noticed the need for a different basename as the preinit output from procd was missing, which indicates a different code path in main.c from procd.
So I now use rdinit=/bin/feminit.
The executable file /bin/feminit contains:
#!/bin/sh +e
ln -s /sbin/procd /init
exec /init
It cannot be fixed by doing the mount before procd starts, as procd will unmount it.

For documentation:
procd inittab needs sysinit and shutdown entries to run the rc scripts. Its script file names are ignored, but their arguments are not.
::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
This was really confusing to me. Maybe /etc/init.d/rcS should be replaced by something like procd:rcS or alike just to avoid confusion?

Regards,
 M. Braun
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to