diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-04 14:49:08 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-04 16:01:11 -0700 |
commit | 71fb6be3ac3d7ce3c7f08b1408c8c9a6b9fc0422 (patch) | |
tree | f935df4e675acb85e00469bbc0f721a9a02699e6 | |
parent | 330470f1f060f579434eb89469f4ed021c95449d (diff) | |
download | vyatta-cfg-71fb6be3ac3d7ce3c7f08b1408c8c9a6b9fc0422.tar.gz vyatta-cfg-71fb6be3ac3d7ce3c7f08b1408c8c9a6b9fc0422.zip |
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.
-rw-r--r-- | templates/interfaces/ethernet/node.tag/duplex/node.def | 2 | ||||
-rw-r--r-- | 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) |