Hi,
I'm installing a DHCPD Server with the packages from a distro
SLES11 SP1 (
dhcp-server-3.1.1-7.12).
And a DNS Server with
PowerDNS:
pdns-recursor-3.3-1
pdns-static-3.0-1
The DHCP update de DNS Server, but
PowerDNS is not
RFC 2135 compliant, and I have to update the
MySQL register from
PowerDNS with a script, when the leased is changed.
This event is reached with the DHCP event managed in...
/etc/dhcpd.conf:...
include "/etc/dhcpd/dhcpd.subnet";
...
/etc/dhcpd/dhcpd.subnet:...
subnet 192.168.12.0 netmask 255.255.255.0 {
option routers 192.168.12.2;
pool {
authoritative;
failover peer "dhcp_failover";
range 192.168.12.20 192.168.12.254;
}
include "/etc/dhcpd/dhcpd.events";
}
...
/etc/dhcpd/dhcpd.events:...
on commit {
set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
log(concat("Commit: IP: ", ClientIP, " Mac: ", ClientMac, " Hostname: ", option host-name));
execute("/usr/local/bin/dhcp-event", "commit", ClientIP, ClientMac, option host-name);
}
...
The problem is that the script cannot run, the log error says "
Unable to execute ...: No such file or directory" "
... exit status 32512".
I cannot understand why:
...
Jan 4 17:19:09 342falsa dhcpd: Commit: IP: 192.168.12.44 Mac: 0:c:29:81:5:2b Hostname: mandingo
Jan 4 17:19:09 342falsa dhcpd: execute_statement argv[0] = /usr/local/bin/dhcp-event
Jan 4 17:19:09 342falsa dhcpd: execute_statement argv[1] = commit
Jan 4 17:19:09 342falsa dhcpd: execute_statement argv[2] = 192.168.12.44
Jan 4 17:19:09 342falsa dhcpd: execute_statement argv[3] = 0:c:29:81:5:2b
Jan 4 17:19:09 342falsa dhcpd: execute_statement argv[4] = mandingo
Jan 4 17:19:09 342falsa dhcpd: Unable to execute /usr/local/bin/dhcp-event: No such file or directory
Jan 4 17:19:09 342falsa dhcpd: execute: /usr/local/bin/dhcp-event exit status 32512
Jan 4 17:19:09 342falsa dhcpd: DHCPREQUEST for 192.168.12.44 from 00:0c:29:81:05:2b (mandingo) via eth0
Jan 4 17:19:09 342falsa dhcpd: DHCPACK on 192.168.12.44 to 00:0c:29:81:05:2b (mandingo) via eth0
...
The contents from "
/usr/local/bin/dhcp-event" is irrelevant, I probed with another code, with another command interpreter, with anothers paths ...
The error is always the same:
...
dhcpd: Unable to execute PATH/SCRIPT: No such file or directory
dhcpd: execute: PATH/SCRIPT exit status 32512
...
I probed with total permissions, with a owner "dhcpd" (the execution from dhcp is "chrooted") ... but the same.
Can somebody help me?
Thank you very much
Best Regards,
Sorry, my English is not good. Be patient ;-)