That's because Entware starts services in numerical order that have an S* start file in /opt/etc/init.d/.
After amtm mounts the /opt folder it kicks off /opt/etc/init.d/rc.unslung which runs the above.
Alright - this rabbit hole goes very deep ...
I watched things over the week - and warm reboots are a mess, things seem to be launched in weird order or when they should not be. For cold reboots the boot sequence seems as expected.
Having said that about warm reboots, I've been warm rebooting daily for a year, and overall despite all the randomness it seems to work reasonably OK, and prevents other issues that accumulate over days of uptime. It's basically - pick your poison.
To address my specific issue of "already in use" it seems this fix helps in mount-entware.mod:
Code:
(sleep 60 && service restart_dnsmasq) &
My best guess is that a couple of dnsmasq restarts were sometimes happening nearly simultaneously, and that was messing things up since there are no locks on those restarts.
Update: Here is a random warm reboot, with the 60 seconds sleep. The last br0 message is the that service restart_dnsmasq command after the 60 seconds sleep. Something else was restarting dnsmasq before that.
Code:
# egrep -a 'Starting Entware|192.168.1.16' messages |grep -v separate
Oct 7 09:40:47 Entware: Starting Entware and Diversion services on /tmp/mnt/ac86u
Oct 7 09:41:00 RT-AC86U-9988 avahi-daemon[6130]: Registering new address record for 192.168.1.16 on br0.IPv4.
Oct 7 09:41:00 RT-AC86U-9988 Diversion: created br0:ad_blocking_excl for 192.168.1.16
Oct 7 09:41:05 RT-AC86U-9988 Diversion: created br0:ad_blocking_excl for 192.168.1.16
Oct 7 09:41:49 RT-AC86U-9988 Diversion: created br0:ad_blocking_excl for 192.168.1.16
Last edited: