execute problems
Jon Otterholm
jon.otterholm at ide.resurscentrum.se
Tue Sep 19 08:30:32 UTC 2006
Hi.
There is not much info on these functions. I hope that someone out there
could share some working examples - but the response on this list is
not overwhelming.
/Jon
muzzol wrote:
> i'm interested in this new option. where can i find more information?
> thx
>
> 2006/9/18, Jon Otterholm <jon.otterholm at ide.resurscentrum.se>:
>
>> Hi.
>>
>> I'm trying to use the new "execute" function in isc-dhcpd-V3.1.0a1 with
>> not all good results.
>>
>> on commit {
>> set hostip = binary-to-ascii(10,8,".", leased-address); set hostmac =
>> binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
>> if (execute ("/usr/scripts/test2.sh", hostip)) = 0) {
>> log (concat ("Firewall updated with new client ", hostip, " ",
>> hostmac));
>> } else {
>> log (concat ("Error while updating firewall with client ", hostip, "
>> ", hostmac));
>> }
>> }
>>
>> /usr/scripts/test2.sh:
>>
>> /bin/echo $1>> /home/jon/test.date
>>
>> When running the script manually it works fine but when triggered by
>> dhcpd the value added to /home/jon/test.date are always null (an empty
>> line).
>>
>> I allso have problems with logging of MAC when there are zeros in the
>> address - they are all left out. For example 0a:0b:0c:0d:0e:0f becoms
>> a:b:c:d:e:f in the logfile.
>>
>> Is this version of dhcpd still to buggy to use - is is better to use a
>> release with the exec-patch?
>>
>> /Jon
>>
>>
>>
>
>
>
More information about the dhcp-users
mailing list