"ddns-domainname" with dhcp-eval

Nicolas C. dhcp at nryc.fr
Sat May 10 11:42:33 UTC 2014


Hello,

I use dhcp-eval to execute a script when an IP address is given by the 
DHCP server.

I'd like to pass the "ddns-domainname" value to the script but I can't 
do it directly, this is what I tried :

subnet 172.20.10.0 netmask 255.255.254.0 {
[...]
ddns-domainname "my.domain.com";

on commit {
	execute ("/usr/local/bin/script", ddns-domainname);
	}
}

Instead, I have to declare another variable (e.g. "ddns-domain") and 
pass this variable to the script.

subnet 172.20.10.0 netmask 255.255.254.0 {
[...]
ddns-domainname "my.domain.com";
set ddns-domain = "my.domain.com";

on commit {
	execute ("/usr/local/bin/script", ddns-domain);
	}
}

It's not a big deal but the simpler, the better so if I can use 
"ddns-domainname" directly, I'll do it.

Thanks,

Nicolas


More information about the dhcp-users mailing list