YazDHCP - alpha - Extended DHCP management script

  • ATTENTION! You'll notice a Prefix dropdown when you create a thread. If your post applies to one of the topics listed, please use that Prefix for your post. When browsing the thread list you can use the Prefix to filter the view.
  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

TheMorpN

Regular Contributor
Any willing alpha testers for this script? I'm confident that I've covered enough in my testing, but I'm currently only able to test on an AC86U which is HND, so I'd like any non-HND users especially!

The script will export and unset the existing nvram variables for static assignments, but I recommend screenshotting your WebUI assignment list in case anything goes wrong. For this reason I'd prefer starting testing with users with not many assignments, so if my script doesn't do something correctly you don't have to manually re-input 50+ entries!

Reply here if interested and I will send a PM.

I would love to test, if possible.

thanks
 

L&LD

Part of the Furniture
@TheMorpN see the link below. :)

 

elorimer

Very Senior Member
Did we do something here to disrupt Diversion's stats processing? It does a lookup to a file that doesn't look to be populated the same way: hosts.dnsmasq in the tmp etc directory.
 

Jack Yaz

Part of the Furniture
Did we do something here to disrupt Diversion's stats processing? It does a lookup to a file that doesn't look to be populated the same way.
ah, we might have done. that'll need a fix in Diversion to accomodate YazDHCP
 

elorimer

Very Senior Member
Reminds me of the old joke about the aircraft carrier and the lighthouse. Who is going to give way?
 

Jack Yaz

Part of the Furniture
Reminds me of the old joke about the aircraft carrier and the lighthouse. Who is going to give way?
well i can't do anything to make diversion check the new files without clogging up /etc/dnsmasq.conf with all of the dhcp-host lines again (if that is in fact what it is doing). doing so would break the "single line" modification we addon writers try to adhere to :)
 

Jack Yaz

Part of the Furniture
One simple solution is to populate host inside host.add
that wouldn't help as my script would conflict with other entries users may have added. it would mean adding logic to check for existing entries and update accordingly - or what if the user has something custom that matches for a particular IP?

it's cleaner to populate DHCP separately via a dedicated file for YazDHCP
 

SomeWhereOverTheRainBow

Very Senior Member
that wouldn't help as my script would conflict with other entries users may have added. it would mean adding logic to check for existing entries and update accordingly - or what if the user has something custom that matches for a particular IP?

it's cleaner to populate DHCP separately via a dedicated file for YazDHCP
You still suffer the issue of what if because the fact there may be a custom host.add and your script does not check for any conflicting entries present inside it as it stands does it.?
 

SomeWhereOverTheRainBow

Very Senior Member
no but at worst they're duplicated and not overwritten
You run the risk for hostnames being listed multiple times per ip or multiple ips per hostname. Idk how clean that is. Maybe you should hijack the host.add and just place a small text section on your enhanced gui for users to place their custom host.add sections.
 
Last edited:

Jack Yaz

Part of the Furniture
You run the risk for hostnames being listed multiple times per ip or multiple ips per hostname. Idk how clean that is. Maybe you should hijack the host.add and just place a small text section on your enhanced gui for users to place their custom host.add sections.
I don't want to manipulate shared files such as hosts.add other than to add/remove a single line. That is the agreed standard Addon developers work with.

I suspect the risk of duplicates happening is very low. The target audience of this script is users who use the GUI and want more space for larger reservation lists. Those of you already using hosts.add and dnsmasq.conf.add I trust are savvy enough to figure out how to avoid duplicates if you decide to use this script :)
 

elorimer

Very Senior Member
If I follow, the compatible lookup for diversion and similar uses would be to jffs.addons.YazDHCP.d.DHCP_Clients and not to tmp.etc.hosts.dnsmasq. The formats are the same, so it should be relatively easy.

So we would be asking @thelonelycoder to set the lookup file as a variable read from a file that it would install, and that this script would manipulate and restore on an uninstall.

(Off point: we can't use slashes in posts?)
 

L&LD

Part of the Furniture
@Jack Yaz, sorry, the website is broken. I can only give you one like! Thank you so much!
 

QuikSilver

Very Senior Member

GHammer

Senior Member
I am unclear as to what file(s) this will touch.
I use dnsmasq.conf.add to enable good ID for my Pi-hole.
How are you using this file, add to or replace contents?
 

Jack Yaz

Part of the Furniture
I am unclear as to what file(s) this will touch.
I use dnsmasq.conf.add to enable good ID for my Pi-hole.
How are you using this file, add to or replace contents?
I add 3 lines, to tell dnsmasq to load dedicated files for:
dhcp reservations (dhcp-host directives)
hostnames
options (for client specific DNS options)
 
Top