diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-21 10:38:55 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-21 10:38:55 -0700 |
commit | 08e0163d5fcbc0ef1bac67c3aa3f14d3915c0f6b (patch) | |
tree | c36dcf50e94bbcb674d0539a1f56190e38a99ec8 | |
parent | 6ece71ecf691431006ae1389f9ab575a1a39683e (diff) | |
download | vyatta-cfg-08e0163d5fcbc0ef1bac67c3aa3f14d3915c0f6b.tar.gz vyatta-cfg-08e0163d5fcbc0ef1bac67c3aa3f14d3915c0f6b.zip |
Only bring up VIF if real device is up
If real device is disabled, then can't bring up VIF.
-rw-r--r-- | templates/interfaces/ethernet/node.tag/vif/node.def | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.def b/templates/interfaces/ethernet/node.tag/vif/node.def index 18582e2..dabfa56 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.def @@ -6,7 +6,10 @@ create: if ! sudo ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vla then echo "Error creating VLAN device $VAR(../@).$VAR(@)" exit 1 fi - sudo ip link set "$VAR(../@).$VAR(@)" up + if /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(../@) --isup + then + sudo ip link set "$VAR(../@).$VAR(@)" up + fi /opt/vyatta/sbin/vyatta-link-detect "$VAR(../@).$VAR(@)" on delete: sudo ip link delete dev "$VAR(../@).$VAR(@)" type vlan id $VAR(@) comp_help: possible completions: |