wrtbwmon
wrtbwmon copied to clipboard
Search for hostnames in the `/etc/config/dhcp` file as well
Hey @pyrovski it's me again!
I think it would be great if wrtbwmon
could also parse the /etc/config/dhcp
file to search for hostnames.
The great thing about this file is that when the user assigns a static IP from the DHCP settings in his router the following entry appears in the file:
config host
option name 'BradleyDesktop'
option dns '1'
option mac '1c:1b:0d:e5:60:f1'
option ip '192.168.1.69'
option leasetime 'infinite'
also, when the user sets a custom hostname from the Hostnames
page the following entry appears:
config domain
option name 'TestDeviceName'
option ip '192.168.1.167'
What do you think? Is this PR worthy?
You can read the whole discussion that led to this solution in Kiougar/luci-wrtbwmon#13