The code extracting VLANID and IF_VLAN_RAW_DEVICE seems overly complex IMHO. The "case" statement already ensures we operate on vlan device so I think something much simpler would work:
VLANID=`echo $IFACE|sed "s/[^.]\+\.\([0-9]\+\).*/\1/; s/^0//"` IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\([^.]\+\)\.[0-9]\+.*/\1/"` This is also easier to read. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1565561 Title: NICs named enpXsX not properly recognized as raw devices To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/vlan/+bug/1565561/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
