aboutsummaryrefslogtreecommitdiffstats
path: root/bridge-port-to-default
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-10-04 22:13:05 +0200
committerGravatar Christian Hesse <mail@eworm.de>2018-10-04 22:13:05 +0200
commit0896d81bb037f934ff6460291a41872a2f8903a3 (patch)
treedeb3ca16b8092220a4b8ee18c5e0a7eb8f5ab041 /bridge-port-to-default
parent311475e67ca23f994d8d31d15a7f63afe1e09648 (diff)
bridge-port-to-default: strip leading blank from comment
Diffstat (limited to 'bridge-port-to-default')
-rw-r--r--bridge-port-to-default3
1 files changed, 3 insertions, 0 deletions
diff --git a/bridge-port-to-default b/bridge-port-to-default
index 3a62a57..3b6ded1 100644
--- a/bridge-port-to-default
+++ b/bridge-port-to-default
@@ -10,6 +10,9 @@
:foreach interface in=[ / interface bridge port find where 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={
:local "interface-name" [ / interface bridge port get $interface interface ];
:local "bridge-default" [ :pick $comment $len [ :len $comment ] ];