decoderman / amtm

amtm - the Asuswrt-Merlin Terminal Menu
https://diversion.ch/amtm.html
GNU General Public License v3.0
175 stars 12 forks source link

Entware setup not calling rc.unslong start #17

Closed tnek213 closed 9 months ago

tnek213 commented 9 months ago

Hi! Thanks for some great software! Apologies if I am reporting this in the wrong place. I might be as I seem to be reporting the first ever issue. Please let me know if I should reach out by some other means.

If I remember correctly /jffs/scripts/services-start used to call /jffs/scripts/services-stop:/opt/etc/init.d/rc.unslung start, so that any package daemon from Entware would be started.

I can only see rc.unslung stop being called nowadays.

orange@router:/tmp/home/root# grep init /jffs/scripts/*
/jffs/scripts/services-stop:/opt/etc/init.d/rc.unslung stop # Added by amtm

In case it's not intentional I wanted to report it. Thanks again and all the best wishes!

decoderman commented 9 months ago

You are correct that /jffs/scripts/services-start used to start Entware services. There were a gazillion problems with this when services-start script was used.

However, with the release of Diversion - the Router Ad-Blocker sometime in 2018 I came up with a much better way by starting Entware services when the device Entware is installed on is mounted. You'll find the file /jffs/addons/amtm/mount-entware.mod is sourced in /jffs/scripts/post-mount` which starts Entware services ever since then. This method works 100% reliable and I have never had a complaint it not working - unless the USB device or the /jffs/ partition is corrupted. amtm uses the same code as Diversion does.

Hope that clears this up for you.