[Kea-users] PXE booting to PHP file and on commit, release, expiry
Christoffer Jönsson
bonchen at imap.cc
Tue Sep 13 16:29:25 UTC 2016
On 2016-09-12 22:58, Klaus Steden wrote:
>
> I don't know about updating PowerDNS, but I suspect you'll have to
> write a plugin. As for the designated boot menu, you can still do
> that, although the syntax is different.
>
> This snippet below -should- do more or less what you're doing with
> vanilla ISC DHCP:
>
> -- cut --
> "client-classes": [
> {
> "name": "bootstrap",
> "test" : "option[60].exists
> "option-data": [
> {
> "name": "boot-file-name",
> "data": "ipxe/undionly.kpxe"
> }
> ]
> },
> {
> "name": "preseed",
> "test": "option[60].hex == 'd-i'",
> "option-data": [
> {
> "data" : "http://10.0.0.9/tftp/boot.php",
> "name" : "boot-file-name"
> }
> ]
> }
> ],
> -- cut --
>
> You're probably going to have to tune that a bit, but this is the
> approach I'm using to manage both server and switch booting, and it
> works well.
>
> hth,
> Klaus
>
> On Mon, Sep 12, 2016 at 11:57 AM, Christoffer Jönsson <bonchen at imap.cc
> <mailto:bonchen at imap.cc>> wrote:
>
> Hello again!
>
> Since the 1.1 release i decided to try and migrate from isc-dhcp.
> And there is a few things I have questions about.
>
> For years I have been using a python script to feed my PowerDNS
> it's records using this:
>
> 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("/etc/pdns/dhcp-event", "commit",
> ClientIP, ClientMac, option host-name);
> }
>
> Is it still possible to call and external script?
>
> At the same time I've been using a php file that loads the
> designated boot menu for the booted mac-address:
>
> subnet 10.0.0.0 netmask 255.255.255.0 {
> [...]
>
> if not exists gpxe.bus-id {
> filename "undionly.kpxe";
> } else {
> filename "http://10.0.0.9/tftp/boot.php";
> }
> [...]
> }
>
> I'm not sure I can still use this line of code?
>
> Thanks in advance!
> _______________________________________________
> Kea-users mailing list
> Kea-users at lists.isc.org <mailto:Kea-users at lists.isc.org>
> https://lists.isc.org/mailman/listinfo/kea-users
> <https://lists.isc.org/mailman/listinfo/kea-users>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20160913/176eed85/attachment.htm>
More information about the Kea-users
mailing list