mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 03:32:04 +00:00
T support predictable nicname on genesis based on Fedora26
This commit is contained in:
parent
970be4a7dd
commit
8560975bc8
14
xCAT-genesis-builder/80-net-name-slot.rules
Normal file
14
xCAT-genesis-builder/80-net-name-slot.rules
Normal 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"
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user