Im in the middle of making a script to manipulate/remove interfaces in the /interfaces bridge vlan untagged section.
I know that a port gets set dynamically when setting pvid in the /interfaces bridge port, but i want to set it on the egress site aswell.
As a port can be set as untagged on multiple vlans, i would like a script that can delete/cleanup, but im not sure how the mikrotik scripting could solve this.
Example: I have ether5,ether6,ether7,ether8 on vlan-ids=2, but ether5 also exists on vlan 5 (someone might have configured this by accident).
i would the like to remove ether 5 on all vlans so i can set the interface on a new vlan.
until now i've tried to export terse to my host machine, and then use grep and sed to manipulate and replace, but that almost gives more issues than what it solves.
im hoping there's a way for the mikrotik device to do it on there, because i already have figured out how to add a new interface without removing existing ones:
Code: Select all
/interface bridge vlan set [find vlan-ids=${pvid}] untagged=([get [find vlan-ids=${pvid}] untagged],\"${interface}\" )
Hope my wall of text isn't too hard to understand, and what im trying to acheive here.