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