Problem with custom variable in bootfile-name

Thomas Novin Thomas.Novin at cygate.se
Thu Jun 18 08:55:44 UTC 2015


Hello

In a class I’m trying to set option bootfile-name containing both a custom-set variable (model) and some text. I’m joining these with concat. But, when I use this custom variable the concat doesn’t work. If I instead use a workaround, using the option vendor-class-identifier itself as a substring, it works. But this doesn’t practically work for me because the VCI has different prefixes depending on SW version on the client. So I need to use my own variable which I can set via a regexp match on the VCI.

        class "6450_auto" {
        match if option vendor-class-identifier ~= "OS6450" and not exists agent.circuit-id;
        max-lease-time 301;
        option tftp-server-name "1.1.1.1";
        option domain-name "6450.auto";

        # Set model based on reported vendor-class-identifier
        if option vendor-class-identifier ~= "OS6450-10" {
                set model = "6450-10";
        }
        if option vendor-class-identifier ~= "OS6450-24" {
                set model = "6450-24";
        }
        if option vendor-class-identifier ~= "OS6450-48" {
                set model = "6450-48";
        }

        option bootfile-name = concat("instruction/", model, ".alu”);
        #option bootfile-name = concat("instruction/", substring(option vendor-class-identifier, 13, 19), ".alu");

        }

One one more strangeness: dhcpd does NOT send the configured domain-name, can that depend on the client, whether it requests it or not?

Daemon version is 4.2.5 running on a CentOS 6 server.

Rgds//Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20150618/bca6a627/attachment.html>


More information about the dhcp-users mailing list