From fac58bc39855de08335a8d7ef479b2a7be8404c0 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 16 Feb 2010 14:50:20 -0800 Subject: Speed up VIF creation The overhead of compiling perl script repeatedly slows down VIF creation --- templates/interfaces/ethernet/node.tag/vif/node.def | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/interfaces/ethernet/node.tag/vif/node.def b/templates/interfaces/ethernet/node.tag/vif/node.def index 610c0e5e..9bf8d47a 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.def @@ -7,9 +7,8 @@ create: if ! sudo ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vla then echo "Error creating VLAN device $VAR(../@).$VAR(@)" exit 1 fi - if /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(../@) --isup - then - sudo ip link set "$VAR(../@).$VAR(@)" up + if [ -z "$VAR(../@/disable)" ]; then + sudo ip link set "$VAR(../@).$VAR(@)" up fi /opt/vyatta/sbin/vyatta-link-detect "$VAR(../@).$VAR(@)" on delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0 -- cgit v1.2.3