From 2c196c5b63d8d97a84af8ffc58fca85aeca8d696 Mon Sep 17 00:00:00 2001 From: immarvin Date: Sat, 9 Aug 2014 02:20:50 -0700 Subject: [PATCH] #4242 In physical rhel7 env,set installnic=ethx can not provision compute node. --- xCAT/postscripts/disableconsistentNICrename | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 xCAT/postscripts/disableconsistentNICrename diff --git a/xCAT/postscripts/disableconsistentNICrename b/xCAT/postscripts/disableconsistentNICrename new file mode 100755 index 000000000..3c5e221b0 --- /dev/null +++ b/xCAT/postscripts/disableconsistentNICrename @@ -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