Setting up DDNS for Samba domain using internal dhcp-eval mechanism.
dhcpcd.conf contains next expressions:
===
...
on commit {
set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
set ClientName = pick-first-value(option host-name, host-decl-name,
"none");
execute("/usr/local/bin/dhcp-update.sh", "add", ClientIP,
ClientName);
}
on release {
set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
set ClientName = pick-first-value(option host-name, host-decl-name,
"none");
execute("/usr/local/bin/dhcp-update.sh", "del", ClientIP, ClientName);
...
===
On commit everything is OK:
===
Feb 16 16:09:45 aura dhcpd: execute_statement argv[0] =
/usr/local/bin/dhcp-update.sh
Feb 16 16:09:45 aura dhcpd: execute_statement argv[1] = add
Feb 16 16:09:45 aura dhcpd: execute_statement argv[2] = 10.5.100.93
Feb 16 16:09:45 aura dhcpd: execute_statement argv[3] = user-7-pc-test
==
Script works, receives all needed arguments and adds records to DNS. But
on release same code doesn't work:
===
Feb 16 16:09:51 aura dhcpd: execute_statement argv[0] =
/usr/local/bin/dhcp-update.sh
Feb 16 16:09:51 aura dhcpd: execute_statement argv[1] = del
Feb 16 16:09:51 aura dhcpd: execute_statement argv[2] = 10.5.100.93
Feb 16 16:09:51 aura dhcpd: execute_statement argv[3] = none
===
dhcp-update.sh script doesn't receive argv[3] from DHCP (host name,
given to host by DHCP-server). But dhcp-lease-list (before releasing
address) shows lease about this machine, including hostname.
Why DHCP-server doesn't give hostname on release ?
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users