Initial import from bf-network-r6.opencode — opencode migration
This commit is contained in:
36
routeros/tp15-core-cleanup-partial.rsc
Normal file
36
routeros/tp15-core-cleanup-partial.rsc
Normal file
@@ -0,0 +1,36 @@
|
||||
# TP15 — Bereinigt den halb-importierten Zustand auf crs326-core,
|
||||
# damit die korrigierte Cutover-Config sauber neu importiert werden kann.
|
||||
# Alle entfernten Objekte werden vom korrigierten tp15-core-cutover-intended.rsc
|
||||
# wieder angelegt (disabled=yes).
|
||||
|
||||
:log info "TP15-cleanup: start"
|
||||
|
||||
# [1] Interface-Lists (incl. Members werden kaskadiert entfernt)
|
||||
:if ([:len [/interface/list/find name="WAN"]] > 0) do={
|
||||
/interface/list/remove [find name="WAN"]
|
||||
}
|
||||
:if ([:len [/interface/list/find name="LAN"]] > 0) do={
|
||||
/interface/list/remove [find name="LAN"]
|
||||
}
|
||||
|
||||
# [2] Staged GW-IPs
|
||||
:if ([:len [/ip/address/find comment~"L3 SVI VLAN"]] > 0) do={
|
||||
/ip/address/remove [find comment~"L3 SVI VLAN"]
|
||||
}
|
||||
|
||||
# [3] Staged WAN DHCP-Client
|
||||
:if ([:len [/ip/dhcp-client/find comment~"TP15 WAN"]] > 0) do={
|
||||
/ip/dhcp-client/remove [find comment~"TP15 WAN"]
|
||||
}
|
||||
|
||||
# [4] DHCP-Pools (keine Server referenzieren sie, Import blieb vor dhcp-server stehen)
|
||||
:if ([:len [/ip/pool/find name~"^pool-v"]] > 0) do={
|
||||
/ip/pool/remove [find name~"^pool-v"]
|
||||
}
|
||||
|
||||
# [5] DHCP-Server/Network-Einträge
|
||||
:if ([:len [/ip/dhcp-server/network/find address~"^10\\.40\\."]] > 0) do={
|
||||
/ip/dhcp-server/network/remove [find address~"^10\\.40\\."]
|
||||
}
|
||||
|
||||
:log info "TP15-cleanup: done"
|
||||
Reference in New Issue
Block a user