diff options
-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(../@) |