ifcfg: only bind to HWADDR, if addr_assign_type == 0
/sys/class/net/$netif/addr_assign_type is != 0 for random MAC address interfacesmaster
parent
fb0e5184a6
commit
2e094b20a6
|
|
@ -518,9 +518,6 @@ find_iface_with_link() {
|
|||
}
|
||||
|
||||
is_persistent_ethernet_name() {
|
||||
[ -f /sys/class/net/$netif/addr_assign_type ] || return 1
|
||||
[ "$(cat /sys/class/net/$netif/addr_assign_type)" = "0" ] || return 1
|
||||
|
||||
case "$1" in
|
||||
# udev persistent interface names
|
||||
eth[0-9]|eth[0-9][0-9]|eth[0-9][0-9][0-9]*)
|
||||
|
|
|
|||
|
|
@ -166,6 +166,8 @@ for netup in /tmp/net.*.did-setup ; do
|
|||
if ! print_s390 $netif; then
|
||||
if [ -z "$macaddr" ] && \
|
||||
! is_persistent_ethernet_name "$netif" && \
|
||||
[ -f /sys/class/net/$netif/addr_assign_type ] && \
|
||||
[ "$(cat /sys/class/net/$netif/addr_assign_type)" = "0" ] && \
|
||||
[ -f /sys/class/net/$netif/address ]; then
|
||||
echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\""
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue