#4242 In physical rhel7 env,set installnic=ethx can not provision compute node.

This commit is contained in:
immarvin 2014-08-09 02:20:50 -07:00
parent 7375805801
commit 8ee690c6a1

View File

@ -0,0 +1,5 @@
#/bin/sh
#modify the grub.cfg to prevent nic consistent network renameing
grep -E -q "net.ifnames=0" /etc/sysconfig/grub || sed -i '/^GRUB_CMDLINE_LINUX=.*/{s/"$/ net.ifnames=0"/}' /etc/sysconfig/grub
grep -E -q "net.ifnames=0" /etc/default/grub || sed -i '/^GRUB_CMDLINE_LINUX=.*/{s/"$/ net.ifnames=0"/}' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg