Am 21.05.2012 11:31, schrieb Cong Wang:
> On 05/21/2012 05:25 PM, Harald Hoyer wrote:
>>> -        printf 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
>>> ATTR{address}=="%s", ATTR{type}=="1", NAME="%s"\n' "$ifname_mac" 
>>> "$ifname_if"
>>> +        #Hack: vlan device has the same mac address with its physical 
>>> device
>>> +        [ -e /tmp/vlan.info ]&&  source /tmp/vlan.info
>>> +        if [ "$ifname_if" != "$vlanname" ]; then
>>> +            printf 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
>>> ATTR{address}=="%s", ATTR{type}=="1", NAME="%s"\n' "$ifname_mac" 
>>> "$ifname_if"
>>> +        fi
>>>       done
>>>
>>>       # Rename non named interfaces out of the way for named ones.
>>
>> Maybe one of the /sys attributes indicate, that it is a vlan interface?
> 
> Hmm... I tried DRIVERS!="8021q", then I got:
> 
> SUBSYSTEM=="net", ACTION=="add", DRIVERS!="8021q", ATTR{address}=="%s",
> ATTR{type}=="1" NAME="eth0"
> 
> SUBSYSTEM=="net", ACTION=="add", DRIVERS!="8021q", ATTR{address}=="%s",
> ATTR{type}=="1" NAME="eth0.2"
> 
> So, eth0 will be still renamed to eth0.2. :(


DEVPATH!="*/virtual/*" should help
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to