What's new

scMerlin How to use SCMerlin without internet?

  • 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!

RandomUser777

Regular Contributor
Is there a way to have the scmerlin script function without internet/WAN access?

It would be nice to have access to the tools (CLI and gui) even if the internet connection is down.
 
It would make sense to have scMerlin installed and ready whilst there is an Internet connection. If you don't want scripts running all the time you could just disable jffs, then re-enable should you have a need.
 
It would make sense to have scMerlin installed and ready whilst there is an Internet connection. If you don't want scripts running all the time you could just disable jffs, then re-enable should you have a need.
Agreed. I have scMerlin and a few other scripts installed.

The issue I'm trying to address is what happens when the router reboots without an internet connection: scMerlin is not available until internet access and ntp synchronization is complete.

There are circumstances albeit rare where one could find themselves without an internet connection, and yet also want to use some of the features of scMerlin.
 
Is there a way to have the scmerlin script function without internet/WAN access?
In theory, I could add an option to the rd router date keeper script in amtm to set nvram set ntp_ready=1 when restoring the date at boot/reboot.
But I'm not sure what implication that has on ntpd actually setting the clock when WAN reconnects.
Maybe @ColinTaylor can elaborate on the good and bad of such a hack.
 
Looks like ntpd does not restore the clock, even if I set ntp_ready=0 and force an ntpd update.
That is a peculiar behavior.
 
If you are comfortable with editing the script, you could just comment out the call to the NTP_Ready() function in the SCMerlin script.

Most of Jack's scripts want the NTP clock set first before the script runs. Even NTPMerlin, which on the surface is kind of counterintuitive (I mean, that is the whole purpose behind running chrony - to set the clock). The real issue is a lot of Asus stuff depends on, or waits for, the NTP_Ready NVRAM variable to be set to 1. I was able to get NTPMerlin to work ok by bypassing the NTP_Ready() function, but other built-in router functions gave me nothing but trouble until the NVRAM variable was set to 1. Manually setting the NVRAM variable works for a while, but I think the watchdog function sets it back to 0 if the Routers NTP client is not updated as the variable would get set back to 0 after a while.

For something like SCMerlin though, you should be able to bypass the NTP_Ready function.
 
If you are comfortable with editing the script, you could just comment out the call to the NTP_Ready() function in the SCMerlin script.

Most of Jack's scripts want the NTP clock set first before the script runs. Even NTPMerlin, which on the surface is kind of counterintuitive (I mean, that is the whole purpose behind running chrony - to set the clock). The real issue is a lot of Asus stuff depends on, or waits for, the NTP_Ready NVRAM variable to be set to 1. I was able to get NTPMerlin to work ok by bypassing the NTP_Ready() function, but other built-in router functions gave me nothing but trouble until the NVRAM variable was set to 1. Manually setting the NVRAM variable works for a while, but I think the watchdog function sets it back to 0 if the Routers NTP client is not updated as the variable would get set back to 0 after a while.

For something like SCMerlin though, you should be able to bypass the NTP_Ready function.
Commenting out NTP_Ready was the exact fix/mod I was looking for.

Tested several times, and each time the CLI and GUI both work when the router reboots without a wan connection (no cable, bad DHCP, whatever).

Thx!
 
Last edited:

Latest threads

Sign Up For SNBForums Daily Digest

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