#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 1f37d0d359
commit 2c196c5b63

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