Now it's possible to, say, call all your vlan interfaces vlan.1, vlan.2,
vlan.N (or lan.X, pub.Y) regardless of the name of the physical
interface handling a given vlan.
exit 0
fi
-VLAN_DEV=$(echo ${DEVICE} | awk ' { gsub(/\..*$/,NUL); print $0 } ')
-VLAN_ID=$(echo ${DEVICE} | awk " { gsub(/${VLAN_DEV}\./,NUL); print \$0 } ")
+if [ -z "$VLAN_DEV" ]; then
+ VLAN_DEV=$(echo ${DEVICE} | awk ' { gsub(/\..*$/,NUL); print $0 } ')
+fi
+VLAN_ID=$(echo ${DEVICE} | awk " { gsub(/^.*\./,NUL); print \$0 } ")
if [ ! -f /etc/sysconfig/interfaces/ifcfg-${VLAN_DEV} ]; then
nls "%s is missing. Can't continue." "ifcfg-${VLAN_DEV}"