From 8f54b89a3a5840c741cacea572b7b5c39b12b02b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 24 Apr 2012 08:58:33 -0700 Subject: vif: remove check for flags when creating VIF Bug 8007 The 3.3 kernel removed sysfs features file (/sys/class/net/ethX/features). Detect vlan failure when added instead. --- templates/interfaces/ethernet/node.tag/vif/node.def | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'templates/interfaces') diff --git a/templates/interfaces/ethernet/node.tag/vif/node.def b/templates/interfaces/ethernet/node.tag/vif/node.def index d184f4bc..ab6da98e 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.def @@ -5,11 +5,7 @@ help: Virtual Local Area Network (VLAN) ID syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 and 4094" val_help: u32:0-4094; VLAN ID -create: if [ $(( $(cat /sys/class/net/$VAR(../@)/features) & 1024 )) -eq 1024 ] - then echo "Error creating VLAN device on $VAR(../@): hardware feature not supported" - exit 1 - fi - if ! ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vlan id $VAR(@) +create: if ! ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vlan id $VAR(@) then echo "Error creating VLAN device $VAR(../@).$VAR(@)" exit 1 fi -- cgit v1.2.3