From 50c357cac4a0ce61bdb47c61a0891a714243a5be Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 3 Dec 2008 10:25:06 -0800 Subject: Use vyatta-link-detect New script to wrap direct calls to vtysh --- templates/interfaces/ethernet/node.def | 3 +-- templates/interfaces/ethernet/node.tag/vif/node.def | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'templates') diff --git a/templates/interfaces/ethernet/node.def b/templates/interfaces/ethernet/node.def index 3023a70..402b13b 100644 --- a/templates/interfaces/ethernet/node.def +++ b/templates/interfaces/ethernet/node.def @@ -10,8 +10,7 @@ syntax:expression: exec " \ fi" update: sudo ip link set "$VAR(@)" up - vyatta-vtysh -c "configure terminal" \ - -c "interface $VAR(@)" -c "link-detect" + vyatta-link-detect $VAR(@) on delete: sudo ip link set "$VAR(@)" down allowed: for dev in /sys/class/net/eth*; do if [[ -d $dev && -L $dev/device ]] diff --git a/templates/interfaces/ethernet/node.tag/vif/node.def b/templates/interfaces/ethernet/node.tag/vif/node.def index d37b045..4d0350b 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.def @@ -5,8 +5,7 @@ syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 a create: sudo modprobe 8021q sudo vconfig add "$VAR(../@)" "$VAR(@)" sudo ip link set "$VAR(../@).$VAR(@)" up - vyatta-vtysh -c "configure terminal" \ - -c "interface $VAR(../@).$VAR(@)" -c "link-detect" + vyatta-link-detect "$VAR(../@).$VAR(@)" on delete: sudo vconfig rem "$VAR(../@).$VAR(@)" comp_help: possible completions: <0-4094> Set VLAN ID -- cgit v1.2.3