From 0896d81bb037f934ff6460291a41872a2f8903a3 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 4 Oct 2018 22:13:05 +0200 Subject: bridge-port-to-default: strip leading blank from comment --- bridge-port-to-default | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bridge-port-to-default') 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 ] ]; -- cgit v1.2.3-54-g00ecf