"unsetting" global options for a host

Glenn Satchell glenn.satchell at uniq.com.au
Tue Jan 31 11:26:15 UTC 2012


On 01/31/12 20:39, Simon Hobson wrote:
> Christian Kratzer wrote:
>
>> why don't you just put the hosts in different groups depending on the
>> options they need. Sounds like you know the specific hosts you need
>> to exluded so why not just list them in a group.
>
> Not sure about the OP, but in the general case it's more likely to be a
> case of "all clients whether specified by host statements or not get
> option X - except for ..."
>
> So it makes sense to specify the option in the global scope so it
> applies to all dynamic clients, in all subnets & pools, as well as
> defined hosts. The problem then is unsetting an option for a small
> number of clients - which might not have fixed addresses. So it would be
> ideal if the following were possible :
>
> option X blah ;
>
> subnet ...
> range ...
> }
>
> group ...
> unset option X
> host ...
> hardware ...
> host ...
> hardware ...
> }

I haven't tried this myself, but what about setting the value to either 
a null string, or a null byte? I think there is a difference between an 
option that is not defined, vs an option with a null value, but it might 
just work. For example:

option X \000;

Plug this into Simon's example above and see how you go. The client 
might just decide that a null value is the same as not set. Or it might 
not :(

-- 
regards,
-glenn



More information about the dhcp-users mailing list