[OpenWrt-Devel] Q: procd: re-evaluation of inittab entries

John Crispin john at phrozen.org
Wed Dec 5 01:57:15 EST 2018


On 04/12/2018 22:59, Michael Heimpold wrote:
> Hi,
>
> I'm currently playing with USB gadget stuff. The goal is to run an Ethernet
> link and a console over the USB link. I already selected the relevant kernel
> modules and ACM device and RNDIS device is created on the USB host
> system - all fine so far.
> The ACM device on the USB gadget side is created as /dev/ttyGS0, and
> when I use "echo foobar > /dev/ttyGS0" or "cat /dev/ttyGS0" on USB device
> side with corresponding counterparts on USB host side, then it already works
> like a charme.
> My problem is the inittab: I think the right approach is to add an entry to
> inittab when I want to provide a login console on this tty, so I added:
> ttyGS0::askfirst:/usr/libexec/login.sh
> at the end of my inittab.
> However, during boot ttyGS0 is not yet available - it takes until the
> USB gadget is setup. procd skips this line at boot time.
>
> So my question is: is this the correct approach, or should I use a
> hotplug script to start such a console?

Hi,

procd uses json_script for hotplug. you could simply extend the clauses 
by adding a is_console function and a execution target such as 
start_console. then add a tiny json script that makes use the of two.

     John


> Regards,
> mhei
>
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list