]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95fcoe: skip VLAN devices in fcoe-up
authorHannes Reinecke <hare@suse.de>
Thu, 11 Dec 2014 14:46:23 +0000 (15:46 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 16 Dec 2014 12:29:36 +0000 (13:29 +0100)
DCB & fipvlan can only be called on real devices, not VLAN
ones. So skip any VLAN devices which might been added to the
list of network interfaces.

References: bnc#878583

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
modules.d/95fcoe/fcoe-up.sh

index b9d04113d4cae9c0ee59b278203ef2e888ef4bf5..7f6eb1bc07dad92197474f848f4e0ff4619267aa 100755 (executable)
@@ -16,6 +16,14 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
 netif=$1
 dcb=$2
 
+iflink=$(cat /sys/class/net/$netif/iflink)
+ifindex=$(cat /sys/class/net/$netif/ifindex)
+if [ "$iflink" != "$ifindex" ] ; then
+    # Skip VLAN devices
+    exit 0
+fi
+
+ip link set dev $netif up
 linkup "$netif"
 
 netdriver=$(readlink -f /sys/class/net/$netif/device/driver)