diff options
author | Kim Hagen <khagen@multi-development.com> | 2015-02-06 10:24:58 +0100 |
---|---|---|
committer | Kim Hagen <khagen@multi-development.com> | 2015-02-06 10:24:58 +0100 |
commit | a0df6222dcf9a8d2a2d6f02b28ede4858d3a5c17 (patch) | |
tree | a44a7e6fa674e68bfa9cfe4505f7593b7266efb0 /templates | |
parent | d77880937b43a323a53a23c5306e88d3cfc214cb (diff) | |
download | vyatta-cfg-system-a0df6222dcf9a8d2a2d6f02b28ede4858d3a5c17.tar.gz vyatta-cfg-system-a0df6222dcf9a8d2a2d6f02b28ede4858d3a5c17.zip |
Can not change EtherType with vif-c interfaces configured
Diffstat (limited to 'templates')
3 files changed, 18 insertions, 3 deletions
diff --git a/templates/interfaces/bonding/node.tag/vif-s/node.tag/ethertype/node.def b/templates/interfaces/bonding/node.tag/vif-s/node.tag/ethertype/node.def index e8a1e810..a79acae4 100644 --- a/templates/interfaces/bonding/node.tag/vif-s/node.tag/ethertype/node.def +++ b/templates/interfaces/bonding/node.tag/vif-s/node.tag/ethertype/node.def @@ -7,7 +7,12 @@ comp_help: possible completions: 0x88A8 802.1AD 0x8100 802.1Q -update: ETHERTYPE=`echo "$VAR(@)"` +update: ACTIVEETHTYPE=`cli-shell-api returnActiveValue interfaces bonding $VAR(../../@) vif-s $VAR(../@) ethertype` + if [ ! -z $VAR(../vif-c/@@) ] && [ ! -z $ACTIVEETHTYPE ] + then echo "Can not change ethertype with vif-c configured" + exit 1 + fi + ETHERTYPE=`echo "$VAR(@)"` if [ $ETHERTYPE == "0x88A8" ]; then ETHTYPE=802.1ad; fi if [ $ETHERTYPE == "0x8100" ]; then ETHTYPE=802.1Q; fi read -a SLAVES </sys/class/net/$VAR(../../@)/bonding/slaves diff --git a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/ethertype/node.def b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/ethertype/node.def index 9a3615be..0a5e954a 100644 --- a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/ethertype/node.def +++ b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/ethertype/node.def @@ -7,7 +7,12 @@ comp_help: possible completions: 0x88A8 802.1AD 0x8100 802.1Q -update: ETHERTYPE=`echo "$VAR(@)"` +update: ACTIVEETHTYPE=`cli-shell-api returnActiveValue interfaces ethernet $VAR(../../@) vif-s $VAR(../@) ethertype` + if [ ! -z $VAR(../vif-c/@@) ] && [ ! -z $ACTIVEETHTYPE ] + then echo "Can not change ethertype with vif-c configured" + exit 1 + fi + ETHERTYPE=`echo "$VAR(@)"` if [ $ETHERTYPE == "0x88A8" ]; then ETHTYPE=802.1ad; fi if [ $ETHERTYPE == "0x8100" ]; then ETHTYPE=802.1Q; fi ip link delete dev "$VAR(../../@).$VAR(../@)" type vlan proto $ETHTYPE id $VAR(../@) > /dev/null 2>&1 diff --git a/templates/interfaces/pseudo-ethernet/node.tag/vif-s/node.tag/ethertype/node.def b/templates/interfaces/pseudo-ethernet/node.tag/vif-s/node.tag/ethertype/node.def index 54ff166c..9e2d5a54 100644 --- a/templates/interfaces/pseudo-ethernet/node.tag/vif-s/node.tag/ethertype/node.def +++ b/templates/interfaces/pseudo-ethernet/node.tag/vif-s/node.tag/ethertype/node.def @@ -7,7 +7,12 @@ comp_help: possible completions: 0x88A8 802.1AD 0x8100 802.1Q -update: ETHERTYPE=`echo "$VAR(@)"` +update: ACTIVEETHTYPE=`cli-shell-api returnActiveValue interfaces pseudo-ethernet $VAR(../../@) vif-s $VAR(../@) ethertype` + if [ ! -z $VAR(../vif-c/@@) ] && [ ! -z $ACTIVEETHTYPE ] + then echo "Can not change ethertype with vif-c configured" + exit 1 + fi + ETHERTYPE=`echo "$VAR(@)"` if [ $ETHERTYPE == "0x88A8" ]; then ETHTYPE=802.1ad; fi if [ $ETHERTYPE == "0x8100" ]; then ETHTYPE=802.1Q; fi ip link delete dev "$VAR(../../@).$VAR(../@)" type vlan proto $ETHTYPE id $VAR(../@) > /dev/null 2>&1 |