mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-12 19:14:27 +02:00
dhcp-to-dns: allow to configure 'dhcp' prefix in zone
This commit is contained in:
parent
ef2cb11665
commit
01fe371a0d
2 changed files with 7 additions and 4 deletions
10
dhcp-to-dns
10
dhcp-to-dns
|
@ -9,15 +9,17 @@
|
||||||
:global Domain;
|
:global Domain;
|
||||||
:global HostNameInZone;
|
:global HostNameInZone;
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
:global PrefixInZone;
|
||||||
|
|
||||||
:global CharacterReplace;
|
:global CharacterReplace;
|
||||||
:global LogPrintExit;
|
:global LogPrintExit;
|
||||||
|
|
||||||
:local Zone;
|
:local Zone $Domain;
|
||||||
:if ($HostNameInZone = true) do={
|
:if ($HostNameInZone = true) do={
|
||||||
:set Zone ("dhcp." . $Identity . "." . $Domain);
|
:set Zone ($Identity . "." . $Zone);
|
||||||
} else={
|
}
|
||||||
:set Zone ("dhcp." . $Domain);
|
:if ($PrefixInZone = true) do={
|
||||||
|
:set Zone ("dhcp." . $Zone);
|
||||||
}
|
}
|
||||||
:local Ttl 5m;
|
:local Ttl 5m;
|
||||||
:local CommentPrefix "managed by dhcp-to-dns for ";
|
:local CommentPrefix "managed by dhcp-to-dns for ";
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
# This is used for DNS and backup file.
|
# This is used for DNS and backup file.
|
||||||
:global Domain "example.com";
|
:global Domain "example.com";
|
||||||
:global HostNameInZone true;
|
:global HostNameInZone true;
|
||||||
|
:global PrefixInZone true;
|
||||||
|
|
||||||
# These addresses are used to send e-mails to. The to-address needs
|
# These addresses are used to send e-mails to. The to-address needs
|
||||||
# to be filled; cc-address can be empty, one address or a comma
|
# to be filled; cc-address can be empty, one address or a comma
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue