redhat: support vlan devices named as "vlan${TAG}"
Since at least the version of initscripts that is in current
RHEL6/CentOS6 (9.03.53) initscripts supports two different naming
styles for vlan interfaces:
$PHYSDEV.$TAG, e.g. "eth0.52"
vlan$TAG, e.g. "vlan52"
In the former case, both the physical device and the vlan tag are
embedded in the vlan device name; in the latter case, only the vlan
tag is embedded in the name, and initscripts (or NetworkManager) looks
for the attribute PHYSDEV in the ifcfg file, and uses that as the
physical device.
netcf was originally written back in the days of RHEL5, and interfaces
named "vlanXXX" weren't supported yet, so until now netcf has only
recognized the old "eth0.42" style.
This patch fixes that omission - existing vlan interfaces named
"vlanXYZ" are now properly recognized, and new ones can be created.
(NB: It is still odd that the digits at the end of the interface name
must match the vlan tag, but there's unfortunately nothing that can be
done about that, since there is no explicit variable in the ifcfg file
that can be used to set the vlan tag.)
Signed-off-by: Leno Hou <lenohou@gmail.com>