ntpMerlin ntpMerlin v3.x

KMO

Occasional Visitor
I think the difference is that the fork doesn't have do_html_post_and_get in its mime_handlers table entry for .js files.

C:
    { "**.js",  "text/javascript", no_cache_IE7, do_html_post_and_get, do_ej, do_auth },

That calls strsep('?') on the input buffer, so replaces the '?' with a '\0', which then means the later check_if_file_exists(file) in handle_request() works.

Those tests around there are a bit wrong though - they should surely be looking at url (query stripped), not file (full path with query, unless handler->input did its strsep).

For example, "192.168.1.1/nonexistentfile.js?blah.log" does nothing rather than return "file not found" because it sees the ".log" in the query and activates the special .log handling.

If it did check_if_file_exists(url) then that ajax dummy "?_timestamp" trick would work on any file. But maybe there are other subtleties.

Just putting that do_html_post_and_get may fix the fork. I'll test it.

MIME table change came in upstream in a GPL 380_3831 merge:

https://github.com/RMerl/asuswrt-merlin/commit/bcde2858bf296d645409a3c7d9014b210c7e9199
 
Last edited:

chongnt

Very Senior Member
A question I want to ask for some time. I cannot recall if this happened after ntpmerlin or firmware update, I noticed that from chronyc clients output, client name is shown now instead of their ip address. I like this better. However, all my host name end with .lan
When I check hosts file, every LAN ip is associated with two notations. One with .lan extension and another without it. Is it possible to edit the hosts file to remove the extension? Example
Code:
192.168.1.1 RT-AC86U-DBA8.lan RT-AC86U-DBA8
 
Last edited:

Jeffrey Young

Very Senior Member
A question I want to ask for some time. I cannot recall if this happened after ntpmerlin or firmware update, I noticed that from chronyc clients output, client name is shown now instead of their ip address. I like this better. However, all my host name end with .lan
When I check hosts file, every LAN ip is associated with two notations. One with .lan extension and another without it. Is it possible to edit the hosts file to remove the extension? Example
Code:
192.168.1.1 RT-AC86U-DBA8.lan RT-AC86U-DBA8

EDIT:

What do you have set as a domain name in your Lan page?

You can not edit the hosts file. It is dynamically built at boot time. You can add entries via the hosts.add file in /jffs/configs or change contents with the hosts.postconf script.

But I think your .lan is coming from your set domain name.
 

SomeWhereOverTheRainBow

Part of the Furniture
A question I want to ask for some time. I cannot recall if this happened after ntpmerlin or firmware update, I noticed that from chronyc clients output, client name is shown now instead of their ip address. I like this better. However, all my host name end with .lan
When I check hosts file, every LAN ip is associated with two notations. One with .lan extension and another without it. Is it possible to edit the hosts file to remove the extension? Example
Code:
192.168.1.1 RT-AC86U-DBA8.lan RT-AC86U-DBA8
You will need that for client identification in Adguard home. If you wish to remove it you can but you will only see your clients by ip address.
 

chongnt

Very Senior Member
EDIT:

What do you have set as a domain name in your Lan page?

You can not edit the hosts file. It is dynamically built at boot time. You can add entries via the hosts.add file in /jffs/configs or change contents with the hosts.postconf script.

But I think your .lan is coming from your set domain name.
Oh yes, you are right. The domain name is indeed "lan". :oops:
 

chongnt

Very Senior Member
You will need that for client identification in Adguard home. If you wish to remove it you can but you will only see your clients by ip address.
Yes, I first noticed this from chronyc clients output. Then with AGH I keep seeing the same .lan extension again. I have just keep the domain name blank and I get a . instead of .lan. Much better now. If we can get rid of the . in AGH or chronyc clients output it is even better.
Code:
192.168.1.1 RT-AC86U-DBA8. RT-AC86U-DBA8
 

ColinTaylor

Part of the Furniture
When I check hosts file, every LAN ip is associated with two notations. One with .lan extension and another without it.
I asked RMerlin to add the unqualified names in the hosts file. They weren't there in prior releases and that was wrong. If you don't like the format displayed by your application fix the application, don't change the hosts file. Also, don't use a blank domain name, all you're doing is creating a domain of null ("") which creates it's own problems.
 

Wade Coxon

Senior Member
I decided to update my entware packages today, and am now getting "Could not open /opt/var/lib/chrony/drift.tmp : Permission denied" errors in my log.

I switched the ntpmerlin to using ntpd via the WebUI, and got a flurry of errors about the server .dat files.
Switching back to chronyd, and things seem to be operating normally again.....
 

Jeffrey Young

Very Senior Member
I decided to update my entware packages today, and am now getting "Could not open /opt/var/lib/chrony/drift.tmp : Permission denied" errors in my log.

I switched the ntpmerlin to using ntpd via the WebUI, and got a flurry of errors about the server .dat files.
Switching back to chronyd, and things seem to be operating normally again.....
Jack's custom init.d file got overwritten by entware's version. When you switched back and forth between time servers, you likely put Jack's custom script back.

Before I do any entware updates, I save the current startup scripts in /opt/etc/init.d and compare them to any updated scripts. Beside the cronyd script being custom, I also custom out my NUT startup script.

I do the same with all the conf files should entware not process properly (I.e. overwrite them) as well.
 

SomeWhereOverTheRainBow

Part of the Furniture
Jack's custom init.d file got overwritten by entware's version. When you switched back and forth between time servers, you likely put Jack's custom script back.

Before I do any entware updates, I save the current startup scripts in /opt/etc/init.d and compare them to any updated scripts. Beside the cronyd script being custom, I also custom out my NUT startup script.

I do the same with all the conf files should entware not process properly (I.e. overwrite them) as well.
Or simply let Jack's script do the opt update for the specific time server (i think it does it automatically when update function of ntpmerlin Is used).
 
Last edited:

cplay

Senior Member
Hey @Jack Yaz ntpd vs chrony

which do you think is better and why?

No idea which one to use (defaults on ntpd)

Thank you :)
 

JGrana

Very Senior Member
Hey @Jack Yaz ntpd vs chrony

which do you think is better and why?

No idea which one to use (defaults on ntpd)

Thank you :)
I’m a fan of chrony. The first thing I do when installing ntpMerlin is change from ntpd to chrony.

Here are a few sites comparing chrony to ntpd.

 

cplay

Senior Member

JohnD5000

Senior Member
I switched from NTPD to Chrony a few days ago. Before, the chart for offset was from 1.5 ms to -1.5 ms and for drift was between 4 -5 ppm. After the switch, everything has been 0.0. Is this not working under Chrony? Is there something else I need to set other than just the NTPD - Chrony switch?
 

Wade Coxon

Senior Member
I switched from NTPD to Chrony a few days ago. Before, the chart for offset was from 1.5 ms to -1.5 ms and for drift was between 4 -5 ppm. After the switch, everything has been 0.0. Is this not working under Chrony? Is there something else I need to set other than just the NTPD - Chrony switch?
Yep, means it isn't working.
You will want to check your chrony configuration file from the command line to make sure that is ok.
You should be able to check its status there too.
 

JGrana

Very Senior Member
As @Wade Coxon said, it's not running/starting. To expand a bit, here are a few steps to get you going:

See if the chronyd log file has any information. It's located at /opt/var/log/chrony.log
Try a restart of chronyd:
$ /opt/etc/init.d/S77chronyd restart

See if any errors are printed and also check the log file above.

It does sound like a problem with the config file. This file is located at /opt/etc/ntdpmerlin.d/chrony.conf

If it is running and you are still getting "0" for times/offsets, use the command chronyc to look around.

One of chronyc commands that is very useful is:
$ chronyc sources

This will show all the remote timeservers it's attempting to get data from.

Chronyc has lots of commands:
$ chronyc help

Good luck!
 

Similar threads

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