dhcp-to-dns: add cname-domain override at global, network and lease level

Allow the CNAME record domain to differ from the A record domain.
Priority: per-lease comment > per-network comment > global config.
Also refactor ParseKeyValueStore call for lease comment into a local
variable to avoid parsing it twice.
This commit is contained in:
Łukasz Witkowski 2026-05-05 21:24:19 +02:00
parent cd4052ba6b
commit b6e933406a
3 changed files with 31 additions and 2 deletions

View file

@ -22,6 +22,11 @@
# and backup scripts for file names.
:global Domain "example.com";
# Override domain used for CNAME records in dhcp-to-dns. Can also be set
# per network or per lease via 'cname-domain=...' in their comment.
# Leave empty to use the same domain as A records (default).
:global DhcpToDnsCnameDomain "";
# You can send e-mail notifications. Configure the system's mail settings
# (/tool/e-mail), then install the module:
# $ScriptInstallUpdate mod/notification-email