-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't define wrtbwmon [user_file] #13
Comments
Hello and sorry for the delay. The Take a look here. Let me know if you need extra help. |
Hi. I have done this successfully with the wrtbwmon binary package, but not the luci-wrtbwmon package, since the luci version has no way to specify the MAC alias "UserDB". Using the hosts, dnsmasq, or dhcp.leases doesn't work for me, because some devices on the network (smart TVs) don't advertise their hostnames with dhcp. I really need to use that "UserDB" |
The page you've linked to says it checks "/etc/hosts" for name maps. In the /etc/hosts directory there is a file named 'dhcp.cfg02411c' with the following" "# auto-generated config file from /etc/config/dhcp When a Hostname is assigned (through Network > Hostnames) the hostname is also written to /etc/config/dhcp/dhcp.cfg02411c and not read by luci-wrtbwmon. |
@BradleyDS2 @Dinsmoor |
@Kiougar Sorry, you are correct. It appears that /tmp/hosts is the directory I was thinking of, and the file in it contains the hostname assignments, while '/etc/hosts' doesn't contain the hostnames. Here's the contents of 'etc/hosts':
|
@BradleyDS2
In other words, even if adding the config option (that @Dinsmoor is suggesting) then the user would have to manually create such a file. In the best case scenario, some of the config files that LuCI handles contains that structure and we can use that file as is (without extra effort from the user). We have to find these files :D |
Maybe some of them (as these are the ones suggested by wrtbwmon) have that structure?
|
The following is the contents of
The following is the contents of
|
Yeah, What about the Otherwise, the custom file created by the user would work right out of the box (because wrtbwmon can already parse these files - using the 4th argument when calling it). Let's wait for @Dinsmoor for feedback. |
The Loading |
So if you define a Hostname in the Bah, it's so frustrating to not have a router atm to test these things... I'm sorry in advance for making you test these things for me :) |
It looks like this in the
While a static ip hostname looks like this:
|
Excellent, thank you! Now all there is left is to create an issue/PR in the |
Hello, all. I'd prefer to be able to specify a path to use my existing User DB. I have no problem using vi to make the file over ssh, since I'll generally only have to change it every once in a while. As long as the method is documented, then it's no big deal. I just want it to work. I really like this package. |
Also, I'm not keen on updating the /etc/config/dhcp because the method for wrtbwmon already works with a custom file, most wrtbwmon users already have their user file, and the simplicity of mac->name substitution is all I'm looking for. |
I see. Then a change in the config page is needed. Will try and fix this as soon as I can. Thank you all for the feedback! |
specially, so, i guess it would be needed to create a kind of serlist on startup of wrtbmon or ... the luci wrtbmon can create that on the call or on a config change ? or on the creation of dhcp ... there is a file: (on my router) which is having: can these files be used ? |
Hello, I've tried (and failed) to add an option to define a user file to replace MACs with nicknames, as the wrtbwmon program allows for.
tried by adding this to model/cbi/wrtbwmon.lua
local macfile = s:option(Value, "macfile", translate("Nickname by MAC file"))
But that's as far as I got, I don't know much about Luci and I have no experience with Lua.
This would be super useful, because these dang Android devices don't allow you to set your own hostnames!
Cheers
The text was updated successfully, but these errors were encountered: