bridge-port-to-default: strip leading blank from comment

This commit is contained in:
Christian Hesse 2018-10-04 22:13:05 +02:00
parent 311475e67c
commit 0896d81bb0

View file

@ -10,6 +10,9 @@
:foreach interface in=[ / interface bridge port find where comment!="" ] do={ :foreach interface in=[ / interface bridge port find where comment!="" ] do={
:foreach comment in=[ :toarray [ / interface bridge port get $interface comment ] ] do={ :foreach comment in=[ :toarray [ / interface bridge port get $interface comment ] ] do={
:if ([ :pick $comment 0 ] = " ") do={
:set comment [ :pick $commecnt 1 [ :len $commecnt ] ];
}
:if ([ :pick $comment 0 $len ] = ($"bridge-port-to" . ":")) do={ :if ([ :pick $comment 0 $len ] = ($"bridge-port-to" . ":")) do={
:local "interface-name" [ / interface bridge port get $interface interface ]; :local "interface-name" [ / interface bridge port get $interface interface ];
:local "bridge-default" [ :pick $comment $len [ :len $comment ] ]; :local "bridge-default" [ :pick $comment $len [ :len $comment ] ];