fixing bug in udev rule writing for mgmt/gw interfaces
This commit is contained in:
parent
87ee7e115e
commit
1dc2ca3525
|
@ -124,11 +124,11 @@ case "$1" in
|
||||||
|
|
||||||
## blow we deal with real physical interfaces
|
## blow we deal with real physical interfaces
|
||||||
## it is crucial that this `ifmac` block is above the rest, since if no mac is returned it will skip the loop and prevent the package install to fail
|
## it is crucial that this `ifmac` block is above the rest, since if no mac is returned it will skip the loop and prevent the package install to fail
|
||||||
if [[ $if = mgmt ]] || [[ $if = mgmtgw ]] || [[ $if = ipmigw ]]
|
if [[ $ifname = mgmt1 ]] || [[ $if = mgmtgw1 ]] || [[ $if = ipmigw1 ]] ## we only support a single interface of these types and they are handled slightly differently in DNS, hence the workaround
|
||||||
then
|
then
|
||||||
ifmac=$(dig_txt mac.${if}.${HOSTNAME}) || continue ## at this point skip the rest of the loop for interfaces that do not have a mac defined (those are not physical)
|
ifmac=$(dig_txt mac.${if}.${HOSTNAME}) || continue ## at this point skip the rest of the loop for interfaces that do not have a mac defined (those are basically not configured)
|
||||||
else
|
else
|
||||||
ifmac=$(dig_txt mac.${ifname}.${HOSTNAME}) || continue ## at this point skip the rest of the loop for interfaces that do not have a mac defined (those are not physical)
|
ifmac=$(dig_txt mac.${ifname}.${HOSTNAME}) || continue ## at this point skip the rest of the loop for interfaces that do not have a mac defined
|
||||||
fi
|
fi
|
||||||
echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="'${ifmac}'", ATTR{type}=="1", NAME="'${ifname}'"' >>$UDEVCONFIG
|
echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="'${ifmac}'", ATTR{type}=="1", NAME="'${ifname}'"' >>$UDEVCONFIG
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue