Hello,
> If you are handling PXE clients, using the vendor client class would
> probably be
> best.
> But if you do want to change an option value based on the content of a
> request, you
> could test the vendor class contents.
> ie.:
> "hooks-libraries": [ {
> "library": "/usr/local/lib/libdhcp_flex_option.so",
> "parameters": {
> "options": [
> {
> "code": 67,
> "supersede":
> "ifelse(substring(option[60].hex,0,20) == 'PXEClient:Arch:00007',
> concat('pxe-x00007','.boot'),'')"
> }
> ]
> }
> }
> ],
But what I'd like to have, is (excerpt)
"client-classes": [
{
"name": "bookworm current-amd64 schlick:/linf/bookworm",
"option-data": [
{
"space": "dhcp4",
"name": "root-path",
"code": 17,
"data": "/linf/bookworm/nfsroot/current-amd64",
"user-context": {
"root-path": "/linf/bookworm/nfsroot/current-amd64"
}
},
{
"space": "dhcp4",
"name": "local-nfs-path",
"code": 170,
"data": "schlick:/linf/bookworm"
}
]
}
],
"hooks-libraries": [
{
"library": "/usr/lib/x86_64-linux-
gnu/kea/hooks/libdhcp_flex_option.so",
"parameters": {
"options": [
{
"space": "dhcp4",
"name": "boot-file-name",
"code": 67,
"add": "ifelse(option[client-system].hex == 0x0007 or
option[client-system].hex == 0x0009', '/linf/' + split(option[17], '/',
3) + '/boot/' + split(option[root-path], '/', 5) + '/syslinux.efi',
'/linf/' + split(option[17], '/', 3) + '/boot/' + split(option[root-
path], '/', 5) + '/pxelinux.0"
}
]
}
}
],
Regards
Christoph
signature.asc
Description: This is a digitally signed message part
-- ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users. Kea-users mailing list [email protected] https://lists.isc.org/mailman/listinfo/kea-users
