procd, possible hotplug issue?

Daniel Golle daniel at makrotopia.org
Fri Feb 23 20:10:04 PST 2024


On Wed, Feb 21, 2024 at 10:01:30PM +0100, e9hack wrote:
> Am 21.02.2024 um 01:21 schrieb Daniel Golle:
> > 
> > Yep, I didn't think about empty variables when I built this...
> > 
> > Can you test this please:
> > https://github.com/openwrt/procd/pull/3
> > 
> 
> This does fix the issue.
> 
> If I test a modified executable, I replaced it by a link to a link on a automatically mounted usb stick. The link on the usb stick points to the modified executable. e.g.:
> 
> /sbin/dnsmasq is renamed to /sbin/dnsmasq.old
> /sbin/dnsmasq -> /mnt/test/dnsmasq/dnsmasq
> /mnt/test/dnsmasq/dnsmasq -> /mnt/test/dnsmasq/dnsmasq-test-something
> 
> If the modification bricks the router, I replace the last link on the usb stick by
> 
> /mnt/test/dnsmasq/dnsmasq -> /sbin/dnsmasq.old
> 
> or
> 
> /mnt/test/dnsmasq/dnsmasq -> /rom/sbin/dnsmasq
> 
> and the router is operational again.
> 
> This doesn't work for procd since procd is needed before the usb stick is mounted.
> 
> How can I do similar things for procd?

There isn't any as convenient option, for the reason you named.
When hacking on procd the qemu targets (malta, armvirt, x86) are very
handy for testing and debugging. Once things work well there I move on
to a "friendly" board (ie. with dualboot/recovery feature, serial
console, pstore which is also good for PID 1 crashes, ...).

> 
> Regards,
> Hartmut
> 
> 
> _______________________________________________
> 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