What's new

Entware Where is Entware started upon reboot?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

bibikalka

Regular Contributor
Alright, I was chasing the mysterious error I was getting from dnsmasq - link.

And it took me down this rabbit hole below. I've taken this out of the post in the Diversion thread, for better visibility. The story is below. But the key question is where are different Entware related things are launched, given that I try to delay commands in the obvious candidate script [/jffs/addons/amtm/mount-entware.mod], and it never waits to start all the other Entware related stuff such as diversion.

###
I was trying to chase which script starts Diversion, and could not find it. I am still chasing that "dnsmasq: failed to create listening socket for 192.168.1.1: Address already in use" error. My present thought is that it could be a boot up timing issue, where cold boots probably boot slower compared to warm ones.

I thought it was this line in post-mount:
Code:
. /jffs/addons/amtm/mount-entware.mod # Added by amtm

But if I add a bunch of sleeps to this script, it still seems to start Diversion without any sleep.
/jffs/addons/amtm/mount-entware.mod

Code:
mount_entware(){
        if [ -f "${opkgFile%/opkg}/diversion" ]; then
                logger -t Entware "Starting Entware and Diversion services on $1"
                ln -nsf "${opkgFile%/bin/opkg}" /tmp/opt
                logger -t Entware "Sleep01"
                sleep 15
                logger -t Entware "Sleep02"
                service restart_dnsmasq
                logger -t Entware "Sleep03"
                sleep 15
                logger -t Entware "Sleep04"
                /opt/etc/init.d/rc.unslung start $0
                logger -t Entware "Sleep11"
                sleep 15
                logger -t Entware "Sleep12"
                service restart_dnsmasq
                logger -t Entware "Sleep13"
                sleep 15
                logger -t Entware "Sleep14"
        else
                logger -t Entware "Starting Entware services on $1"
                ln -nsf "${opkgFile%/bin/opkg}" /tmp/opt
                /opt/etc/init.d/rc.unslung start $0
        fi
}

Here is an example from the log, where I don't see the expected 15 seconds. It seems something else starts Diversion elsewhere?
Code:
Sep 29 04:06:33 Entware: Starting Entware and Diversion services on /tmp/mnt/ac86u
Sep 29 04:06:33 Entware: Sleep01
...
Sep 29 04:06:38 RT-AC86U-9988 Diversion: created br0:ad_blocking_excl for 192.168.1.16
...
Sep 29 04:06:38 RT-AC86U-9988 Diversion: started separate Dnsmasq instance for ad-blocking exclusion on IP 192.168.1.16
...

Update:
For some strange reason things never even get to "Sleep02" message, it just keeps running stuff elsewhere!
Code:
Sep 30 04:06:33 custom_script: Running /jffs/scripts/post-mount (args: /tmp/mnt/ac86u)
Sep 30 04:06:33 Entware: Starting Entware and Diversion services on /tmp/mnt/ac86u
Sep 30 04:06:33 Entware: Sleep01
Sep 30 04:06:33 avahi-daemon[3513]: Server startup complete. Host name is RT-AC86U-9988.local. Local service cookie is 1338142308.
Sep 30 04:06:33 avahi-daemon[3513]: Alias name "RT-AC86U" successfully established.
Sep 30 04:06:33 Skynet: [i] Startup Initiated... ( skynetloc=/tmp/mnt/ac86u/skynet )
Sep 30 04:06:35 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
Sep 30 04:06:35 rc_service: udhcpc_wan 1404:notify_rc stop_samba
Sep 30 04:06:35 custom_script: Running /jffs/scripts/service-event (args: stop samba)
Sep 30 04:06:35 wsdd2[3527]: Terminated received.
Sep 30 04:06:35 wsdd2[3527]: terminating.
Sep 30 04:06:36 kernel: klogd: exiting
Sep 30 04:06:36 syslogd exiting
Sep 30 04:06:37 RT-AC86U-9988 uiScribe: Mounting WebUI page for uiScribe
Sep 30 04:06:37 RT-AC86U-9988 uiScribe: Mounted uiScribe WebUI page as Main_LogStatus_Content.asp
Sep 30 04:06:37 RT-AC86U-9988 avahi-daemon[3513]: Registering new address record for 192.168.1.16 on br0.IPv4.
Sep 30 04:06:37 RT-AC86U-9988 Diversion: created br0:ad_blocking_excl for 192.168.1.16
 
Last edited:

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top