summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-06-04 14:49:08 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2009-06-12 15:19:01 -0700
commit6bd650f8ebcf63008a5a8dbbff19f56224857310 (patch)
tree8bc24fb7af087c952c22738bcdb702bd45a9e84f
parent6f008c2a35b5ab2e7e85d8bd0771e5c4badab955 (diff)
downloadvyatta-cfg-6bd650f8ebcf63008a5a8dbbff19f56224857310.tar.gz
vyatta-cfg-6bd650f8ebcf63008a5a8dbbff19f56224857310.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. (cherry picked from commit 71fb6be3ac3d7ce3c7f08b1408c8c9a6b9fc0422)
-rw-r--r--templates/interfaces/ethernet/node.tag/duplex/node.def2
-rw-r--r--templates/interfaces/ethernet/node.tag/speed/node.def2
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)