Commit graph

34 commits

Author SHA1 Message Date
Christian Hesse
009674b5bc bump RouterOS requirement for all scripts and modules...
... now that global-functions requires RouterOS 7.13 anyway.
2024-04-07 22:51:24 +02:00
Christian Hesse
5c775fdb3f dhcp-to-dns: switch to $LogPrint 2024-03-12 20:37:57 +01:00
Christian Hesse
19802c0b69 global-functions: $LogPrintOnce: drop support for exit
This is not widely adopted or used, so let's just drop it - no
compatibility.
2024-03-12 20:37:57 +01:00
Christian Hesse
ef5972e9f0 dhcp-to-dns: drop main function, use :do with on-error 2024-03-12 15:27:15 +01:00
Christian Hesse
1e8918fdaa global-functions: $ScriptLock: do not exit from global function 2024-03-12 15:27:15 +01:00
Christian Hesse
29f544d18d dhcp-to-dns: move code into function 2024-03-04 17:04:45 +01:00
Christian Hesse
c5714e5dc8 dhcp-to-dns: use $CleanName 2024-01-31 23:10:15 +01:00
Christian Hesse
6c52bd692b dhcp-to-dns: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
a7619a5119 global-functions: $LogPrintOnce: support exit 2024-01-18 10:19:22 +01:00
Christian Hesse
9a73fc526f update copyright for 2024 2024-01-01 15:25:25 +01:00
Christian Hesse
a407332ea1 dhcp-to-dns: prepare string 'mac in server' 2023-10-27 22:46:47 +02:00
Christian Hesse
a769ed072b dhcp-to-dns: prepare full names for A and CNAME records 2023-10-27 22:34:52 +02:00
Christian Hesse
576364f44a dhcp-to-dns: info on mac address bound multiple time 2023-10-27 14:13:58 +02:00
Christian Hesse
c34599fe46 dhcp-to-dns: warn on duplicate names 2023-10-27 14:13:58 +02:00
Christian Hesse
3474b9a15c 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...
2023-10-27 14:13:58 +02:00
Christian Hesse
9bfa303038 dhcp-to-dns: use 'active-' properties from lease
Turns out that address for static leases can be an address pool. Of
course that breaks the script as an ip address is expected. Use
'active-address'  instead.

Also let's do the same for 'active-mac-address'...

Fixes GH-43
2023-06-08 21:58:29 +02:00
Christian Hesse
ee94024dca dhcp-to-dns: get domain from dhcp server's network definition 2023-04-24 22:26:26 +02:00
Christian Hesse
ac5d84173f dhcp-to-dns: rename variable to not clash with global one 2023-04-24 22:26:26 +02:00
Christian Hesse
79cdefbd1e dhcp-to-dns: handle change of domain 2023-04-24 22:26:26 +02:00
Christian Hesse
517bb4ede8 dhcp-to-dns: get all values of dns record 2023-04-24 22:26:26 +02:00
Christian Hesse
4c416cb39e dhcp-to-dns: handle duplicate leases earlier 2023-04-24 22:26:26 +02:00
Christian Hesse
f3876b0637 dhcp-to-dns: handle dns record by comment and type 2023-04-24 22:26:26 +02:00
Christian Hesse
779b3b8872 dhcp-to-dns: use better condition
The condition worked, but could match others (AAAA, NXDOMAIN, ...) as
well (though these should not exist).

The problem is that matching with `type=A` does not return any results.
For historical reasons A records have no type, thus can be matched with
`!type`. I opened an issue to fix this... (SUP-111312)

So let's assum `!type` works and `type=A` could become valid...
2023-03-29 15:49:41 +02:00
Christian Hesse
d700dbc00e dhcp-to-dns: support host name from dhcp lease comment
The lease comment is supposed to be a human readable string... But we
could allow parsable information.
2023-03-28 12:05:47 +02:00
Christian Hesse
40f0d54ea8 dhcp-to-dns: add cname if host name appears for existing record 2023-03-28 11:42:58 +02:00
Christian Hesse
295ccb570d dhcp-to-dns: update cname record on changed host name 2023-03-22 21:53:32 +01:00
Christian Hesse
b13a53531b dhcp-to-dns: just update the address
The other values *should* be unchanged...
2023-03-22 21:53:32 +01:00
Christian Hesse
c5c235246b dhcp-to-dns: add debug message on duplicate leases 2023-03-22 21:53:32 +01:00
Christian Hesse
8c728bb6ab dhcp-to-dns: do not update records based on host name 2023-03-22 21:53:32 +01:00
Christian Hesse
aac8709881 dhcp-to-dns: always create A record with mac address...
... and an optional CNAME with host name.
2023-03-22 21:53:32 +01:00
Christian Hesse
4a0f395fe1 dhcp-to-dns: split fqdn to host name and domain 2023-03-22 10:42:41 +01:00
Christian Hesse
682a09c94b dhcp-to-dns: match comment on beginning of line 2023-03-22 10:13:24 +01:00
Christian Hesse
3d589def7d dhcp-to-dns: allow the matching separator string in name 2023-03-22 10:13:24 +01:00
Christian Hesse
a832fd04ef rename scripts and add file extension ".rsc"
No functional change for the user... The migration is done
automatically.
2023-03-07 22:26:01 +01:00