diff options
Diffstat (limited to 'templates/interfaces/ethernet')
-rw-r--r-- | templates/interfaces/ethernet/node.tag/duplex/node.def | 7 | ||||
-rw-r--r-- | templates/interfaces/ethernet/node.tag/speed/node.def | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/templates/interfaces/ethernet/node.tag/duplex/node.def b/templates/interfaces/ethernet/node.tag/duplex/node.def index 0351365f..023a8a08 100644 --- a/templates/interfaces/ethernet/node.tag/duplex/node.def +++ b/templates/interfaces/ethernet/node.tag/duplex/node.def @@ -4,9 +4,10 @@ default: "auto" syntax:expression: $VAR(@) in "auto", "half", "full"; "duplex must be auto, half or full" allowed: echo auto half full -commit:expression: ( $VAR(@) == "auto" && $VAR(../speed/@) == "auto" ) || \ - ( $VAR(@) != "auto" && $VAR(../speed/@) != "auto" ) ; \ - "if duplex is hardcoded, speed must also be hardcoded" +commit:expression: exec " \ + /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(../@) \ + --check-speed $VAR(../speed/@) $VAR(@)" + update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(../@) \ --speed-duplex $VAR(../speed/@) $VAR(@) diff --git a/templates/interfaces/ethernet/node.tag/speed/node.def b/templates/interfaces/ethernet/node.tag/speed/node.def index fbdc5893..fad248af 100644 --- a/templates/interfaces/ethernet/node.tag/speed/node.def +++ b/templates/interfaces/ethernet/node.tag/speed/node.def @@ -4,9 +4,10 @@ default: "auto" syntax:expression: $VAR(@) in "auto", "10", "100", "1000", "2500", "10000"; "Speed must be auto, 10, 100, 1000, 2500, or 10000" allowed: echo auto 10 100 1000 2500 10000 -commit:expression: ( $VAR(@) == "auto" && $VAR(../duplex/@) == "auto" ) || \ - ( $VAR(@) != "auto" && $VAR(../duplex/@) != "auto" ) ; \ - "if speed is hardcoded, duplex must also be hardcoded" +commit:expression: exec "\ + /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(../@) \ + --check-speed $VAR(@) $VAR(../duplex/@)" + update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(../@) \ --speed-duplex $VAR(@) $VAR(../duplex/@) |