diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-11 20:04:20 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-11 20:04:20 -0700 |
commit | 1fe53b8edbc7f5d51bf05b640eb63b8ebe183560 (patch) | |
tree | 2e539b200c08a72c11f7177f16c0a89e8f4cf689 /templates | |
parent | 5c348adcb1cc340b17db71176ce283ef48023f38 (diff) | |
download | vyatta-cfg-1fe53b8edbc7f5d51bf05b640eb63b8ebe183560.tar.gz vyatta-cfg-1fe53b8edbc7f5d51bf05b640eb63b8ebe183560.zip |
Block disabling interface with VIF
If interface with VIF is disabled, then it would fail on next boot
when VIF's were created.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/interfaces/ethernet/node.tag/disable/node.def | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/interfaces/ethernet/node.tag/disable/node.def b/templates/interfaces/ethernet/node.tag/disable/node.def index 90dd582..b7fcd49 100644 --- a/templates/interfaces/ethernet/node.tag/disable/node.def +++ b/templates/interfaces/ethernet/node.tag/disable/node.def @@ -1,5 +1,10 @@ help: Set interface disabled -update: /etc/netplug/linkdown.d/dhclient $VAR(../@) +create: vif=`/opt/vyatta/sbin/vyatta-interfaces.pl --vif=$VAR(../@) --show` + if [ ! -z $vif ]; then + echo "Can not disable interface " $VAR(../@) " with vif:" $vif + exit 1 + fi + /etc/netplug/linkdown.d/dhclient $VAR(../@) if ! sudo ip link set $VAR(../@) down 2>/dev/null; then echo "Error disabling dev $VAR(../@)" /etc/netplug/linkup.d/dhclient $VAR(../@) |