2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 19:22:05 +00:00

T support predictable nicname on genesis based on Fedora26

This commit is contained in:
ertaozh 2017-07-19 06:04:55 -04:00
parent 970be4a7dd
commit 8560975bc8
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,14 @@
# do not edit this file, it will be overwritten on update
ACTION!="add", GOTO="net_name_slot_end"
SUBSYSTEM!="net", GOTO="net_name_slot_end"
NAME!="", GOTO="net_name_slot_end"
IMPORT{cmdline}="net.ifnames"
ENV{net.ifnames}=="0", GOTO="net_name_slot_end"
NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}"
NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}"
NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}"
LABEL="net_name_slot_end"

View File

@ -178,6 +178,10 @@ for d in `echo $PERL_LIB_DIR`; do
fi
done
# create the predictable naming for nics
LIB_UDEV_RULES="/lib/udev/rules.d/"
cp $DRACUTMODDIR/80-net-name-slot.rules /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs/lib/udev/rules.d/
if [ $? -ne 0 ]; then
echo "ERROR - expanding the initramfs, please correct the issues and try again"
exit 1