What's new
  • 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!

spdMerlin spdMerlin v4.4.16 [2025-Nov-16] - Internet Speedtest and Monitoring Tool for AsusWRT Merlin

Are both of these files still valid? I suspect the script could be erroring out if one is not found. I thought all the Entware modules moved exclusively to amtm.

I believe . /jffs/addons/amtm/mount-entware.mod is still valid:

1763046718527.png


not sure what about: . /jffs/addons/diversion/mount-entware.div though.
Even if it's not valid though, the lines following in his post-mount are running as expected (such as tailmon)

Code:
cat /jffs/scripts/post-mount
#!/bin/sh
swapon /tmp/mnt/USB_120GB/myswap.swp # Added by amtm
. /jffs/addons/amtm/mount-entware.mod # Added by amtm
. /jffs/addons/diversion/mount-entware.div # Added by amtm
(sleep 30 && /jffs/scripts/tailmon.sh -screen) & # Added by tailmon

[ -x "${1}/entware/bin/opkg" ] && [ -x /jffs/scripts/spdmerlin ] && /jffs/scripts/spdmerlin startup "$@" & # spdMerlin

AsusAdmin@RT-AX88U_Pro-0998:/tmp/home/root#

And here is the systemlog confirming that part:

Code:
Jan  1 00:02:03 Entware: Starting Entware services on /tmp/mnt/USB_120GB
Jan  1 00:02:03 AsusAdmin: Started tailscaled from /jffs/scripts/post-mount.
 
I've gone ahead and did a very quick spdMerlin code review. I found out -to my surprise- that force update, and update processes DO NOT check for the existence of the startup command line the script needs at router's boot up, or to be more specific, after a USB disk is mounted.
That's the wrong assessment. You're not reading the code correctly, or you're not doing the proper analysis to understand the execution flow. The check is always done after the add-on update (or force update) has completed.
 
Is that really from tailmon, or is it the Entware startup script running?
@alan6854321 should just run:
/jffs/scripts/post-mount /tmp/mnt/dummy

And see if it complains.

That's a good point, I assumed it came from tailmon but it could be just the entware service.
Let's see what alan says with the test
 
Alan says "Yahoo - it works!"

This confirms the problem was solved by removing:

Code:
. /jffs/addons/diversion/mount-entware.div # Added by amtm

From the post-mount script.

Seems like maybe diversion left some remnants behind? Causing post-mount to fail to run the lines following.
Which means alan was likely having issues with both spdmerlin as well as tailmon.
 
A minor surprise, TAILMON sent me an Email, it's never done that before....

Code:
WARNING: Router Has Unexpectedly Restarted

Date/Time: Nov 13 2025 15:51:08

WARNING: TAILMON has detected that the router may have rebooted or was restarted. TAILMON.
has reset the service, and reestablished a connection to your Tailnet. Please investigate if this
behavior continues to persist.

Sent by the "tailmon.sh" script.
From the "RT-AX88U" router.

2025-Nov-13 Thu 03:51:08 PM GMT
 
A minor surprise, TAILMON sent me an Email, it's never done that before....

Code:
WARNING: Router Has Unexpectedly Restarted

Date/Time: Nov 13 2025 15:51:08

WARNING: TAILMON has detected that the router may have rebooted or was restarted. TAILMON.
has reset the service, and reestablished a connection to your Tailnet. Please investigate if this
behavior continues to persist.

Sent by the "tailmon.sh" script.
From the "RT-AX88U" router.

2025-Nov-13 Thu 03:51:08 PM GMT

Happy you found a solution! And it required no code changes!
I'd like to know more about why that was left behind in your post-mount though if it's no longer valid.

We may need to poke @thelonelycoder for that one though.
 
Seems like maybe diversion left some remnants behind? Causing post-mount to fail to run the lines following.
I just noticed your comment, but I've never run diversion on any of my routers (I use PiHole)
So how did that get there?
 
I just noticed your comment, but I've never run diversion on any of my routers (I use PiHole)
So how did that get there?

Interesting, then I'm not sure I'm qualified to answer that one.

Hopefully thelonelycoder has more of an idea where it comes from.
 
What would happen if I just ran the post-mount script in a terminal, would it cause problems?
Yeah, it might cause a lot of problems.
In general, running the "post-mount" script a second time in the same router boot cycle, will run second instances of each script called from there, which probably might cause various problems for already running scripts. It also might cause errors when trying to execute commands that shouldn't be executed twice in the same boot cycle.
This is the general case though. Most of the scripts in this community already deal with these problems with lock files and other proper means.
So FYI, no, running post-mount script a second time is totally a bad idea.
 
A minor surprise, TAILMON sent me an Email, it's never done that before....

Code:
WARNING: Router Has Unexpectedly Restarted

Date/Time: Nov 13 2025 15:51:08

WARNING: TAILMON has detected that the router may have rebooted or was restarted. TAILMON.
has reset the service, and reestablished a connection to your Tailnet. Please investigate if this
behavior continues to persist.

Sent by the "tailmon.sh" script.
From the "RT-AX88U" router.

2025-Nov-13 Thu 03:51:08 PM GMT
If the router uptime is less than 10 minutes and TAILMON was started during that time, it assumes the router was just restarted. It was added by popular demand as a way to detect a possibly unplanned reboot to make sure things were still working with Tailscale. Over time, it's been a great notification on those rare times my router has spontaneously rebooted for no reason so I can dig into it further. Thinking about adding this feature to RTRMON as well. ;)

(Sorry for the off-topic post guys! :) )
 
Last edited:
Release Notes for spdMerlin v4.4.16 production version now available
[2025-Nov-16]


1) FIXED: Modified code to make sure we get the correct parameters when changing settings from the WebUI.
2) Miscellaneous code improvements.



The fork from @Jack Yaz's spdMerlin add-on is now hosted on the AMTM-OSR GitHub repo:
 
If the router uptime is less than 10 minutes and TAILMON was started during that time, it assumes the router was just restarted. It was added by popular demand as a way to detect a possibly unplanned reboot to make sure things were still working with Tailscale. Over time, it's been a great notification on those rare times my router has spontaneously rebooted for no reason so I can dig into it further.
Yes, thing is I only saw this message when I removed the
"/jffs/addons/diversion/mount-entware.div # Added by amtm"
line from the post-mount script. Despite many reboots trying to find my problem with the spdMerlin WebUI.

(You might need to read back through this thread to understand what I'm talking about)
 

Similar threads

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!
Back
Top