From 71fb6be3ac3d7ce3c7f08b1408c8c9a6b9fc0422 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 4 Jun 2009 14:49:08 -0700 Subject: Make sure interface name regex are anchored Bug 4501 This solves the problem that 'show interfaces ethernet' also shows pseudo ethernet (peth0) device. The problem was that peth0 matched the regex since it was missing start/end. --- templates/interfaces/ethernet/node.tag/duplex/node.def | 2 +- templates/interfaces/ethernet/node.tag/speed/node.def | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/interfaces/ethernet/node.tag/duplex/node.def b/templates/interfaces/ethernet/node.tag/duplex/node.def index 4600533..9277729 100644 --- a/templates/interfaces/ethernet/node.tag/duplex/node.def +++ b/templates/interfaces/ethernet/node.tag/duplex/node.def @@ -5,7 +5,7 @@ syntax:expression: $VAR(@) in "auto", "half", "full"; "duplex must be auto, half commit:expression: ( $VAR(@) == "auto" && $VAR(../speed/@) == "auto" ) || \ ( $VAR(@) != "auto" && $VAR(../speed/@) != "auto" ) ; \ "if duplex is hardcoded, speed must also be hardcoded" -update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$(../@) \ +update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(../@) \ --speed-duplex $VAR(../speed/@) $VAR(@) comp_help:Possible completions: auto\t\tAuto negotiation (default) diff --git a/templates/interfaces/ethernet/node.tag/speed/node.def b/templates/interfaces/ethernet/node.tag/speed/node.def index 436e481..e822df9 100644 --- a/templates/interfaces/ethernet/node.tag/speed/node.def +++ b/templates/interfaces/ethernet/node.tag/speed/node.def @@ -5,7 +5,7 @@ syntax:expression: $VAR(@) in "auto", "10", "100", "1000", "2500", "10000"; "Spe commit:expression: ( $VAR(@) == "auto" && $VAR(../duplex/@) == "auto" ) || \ ( $VAR(@) != "auto" && $VAR(../duplex/@) != "auto" ) ; \ "if speed is hardcoded, duplex must also be hardcoded" -update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$(../@) \ +update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(../@) \ --speed-duplex $VAR(@) $VAR(../duplex/@) comp_help:Possible completions: auto\t\tAuto negotiation (default) -- cgit v1.2.3