Page 1 of 1

Simple alias mgt in DHCP

Posted: Tue Jul 12, 2016 9:15 am
by cr1cr1
Hi,

[I'm using a 1.6.0 version, not sure if the following suggestion has been implemented in newer versions]

When setting an alias in the DHCP page (2 hostnames separated by a space) , it works and writes the correct line in /etc/hosts file.

Gargoyle GUI seems to forget it when we come back to this page (the second hostname after the space is forgotten) and then the alias will be erased in /etc/hosts in case of a change.

Would it be possible to "remember" hostnames with spaces in order to take into account hostname aliases?
Thanks,

cr1cr1

Re: Simple alias mgt in DHCP

Posted: Wed Sep 14, 2016 11:55 am
by cr1cr1
Am I missing something?
How do you manage hostname aliases with Gargoyle?
Thanks for your hints,
Cr1cr1

Re: Simple alias mgt in DHCP

Posted: Wed Sep 14, 2016 4:41 pm
by Lantis
I doubt this is a simple request. I expect it would cause unexpected behaviour all over the place.

The reason they aren't displaying correctly when you come back to the page is that the page reads the file back based on tab delimiters, not spaces.
Therefore it disregards the second word or phrase.

You can modify /www/dhcp.sh to change this behaviour, but I'm unsure of the effect of aliases elsewhere.

Re: Simple alias mgt in DHCP

Posted: Thu Sep 15, 2016 3:31 am
by cr1cr1
Thanks for your answer. I'll investigate this.
I have not had any issue yet since I created this alias in my dhcp file though, but I understand this may be much more complex to validate !

Re: Simple alias mgt in DHCP

Posted: Sat Jan 28, 2017 9:27 am
by ektus
I believe I've got a somewhat related problem. I've set a list with static IPs in the DHCP configuration. This list includes the MAC and desired IP of an Android device. The Android device doesn't accept (or get) the right IP as long as the devices hostname and the hostname in the DHCP list don't match. But android-xxx as hostname is not what I want to see in the statistics everywhere, I want to see "Ektus-Smartphone" to easily identify it. But as soon as I set that name, the phone uses an address from the general DHCP range. The phone is not rooted, so I can't change its name :-(

Is there any way to solve this?