dhcp-to-dns: allow multiple records for one mac address

Now that we can have differnt name suffixes via networks it makes sense
to allow multiple records for one mac address.

Also update the wording for messages...
This commit is contained in:
Christian Hesse 2023-10-27 08:58:29 +02:00
parent 72b4851255
commit 3474b9a15c
3 changed files with 34 additions and 25 deletions

View file

@ -24,6 +24,7 @@
108="Enhanced 'log-forward' to list log messages with colorful bullets to indicate severity.";
109="Added support to send notifications via Ntfy (ntfy.sh).";
110="Dropped support for loading scripts from local storage.";
111="Modified 'dhcp-to-dns' to allow multiple records for one mac address.";
};
# Migration steps to be applied on script updates
@ -31,4 +32,5 @@
97=":local Rec [ /ip/dns/static/find where comment~\"^managed by dhcp-to-dns for \" ]; :if ([ :len \$Rec ] > 0) do={ /ip/dns/static/remove \$Rec; /system/script/run dhcp-to-dns; }";
100=":global ScriptInstallUpdate; :if ([ :len [ /system/script/find where name=\"ssh-keys-import\" source~\"^#!rsc by RouterOS\\n\" ] ] > 0) do={ /system/script/set name=\"mod/ssh-keys-import\" ssh-keys-import; \$ScriptInstallUpdate; }";
104=":global CharacterReplace; :global ScriptInstallUpdate; :foreach Script in={ \"capsman-download-packages\"; \"capsman-rolling-upgrade\"; \"hotspot-to-wpa\"; \"hotspot-to-wpa-cleanup\" } do={ /system/script/set name=(\$Script . \".capsman\") [ find where name=\$Script ]; :foreach Scheduler in=[ /system/scheduler/find where on-event~(\$Script . \"([^-.]|\\\$)\") ] do={ /system/scheduler/set \$Scheduler on-event=[ \$CharacterReplace [ get \$Scheduler on-event ] \$Script (\$Script . \".capsman\") ]; }; }; /ip/hotspot/user/profile/set on-login=\"hotspot-to-wpa.capsman\" [ find where on-login=\"hotspot-to-wpa\" ]; \$ScriptInstallUpdate;";
111=":local Rec [ /ip/dns/static/find where comment~\"^managed by dhcp-to-dns for \" ]; :if ([ :len \$Rec ] > 0) do={ /ip/dns/static/remove \$Rec; /system/script/run dhcp-to-dns; }";
};