diff --git a/xCAT-server/share/xcat/netboot/rh/dracut/xcat-cmdline.sh b/xCAT-server/share/xcat/netboot/rh/dracut/xcat-cmdline.sh index 6559a23ac..d445cf585 100644 --- a/xCAT-server/share/xcat/netboot/rh/dracut/xcat-cmdline.sh +++ b/xCAT-server/share/xcat/netboot/rh/dracut/xcat-cmdline.sh @@ -1,5 +1,4 @@ root=1 rootok=1 -IFACES=eth0 #THIS WILL SOURCE FROM /procm/cmdline if genimage -i argument omitted, TODO netroot=xcat echo '[ -e $NEWROOT/proc ]' > /initqueue-finished/xcatroot.sh diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 349a48fc2..aaf6fa5cc 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -480,6 +480,12 @@ sub mkinitrd_dracut { cp($_,"$rootimg_dir/usr/share/dracut/modules.d/97xcat"); chmod($perm&07777,"$rootimg_dir/usr/share/dracut/modules.d/97xcat/".basename($_)); } + if ($prinic) { + my $optspec; + open($optspec,'>>',"$rootimg_dir/usr/share/dracut/modules.d/97xcat/xcat-cmdline.sh"); + print $optspec "IFACE=$prinic\n"; + close($optspec); + } foreach (@ndrivers) { s/\.ko$//; } system("chroot '$rootimg_dir' dracut -d '".join(' ',@ndrivers)."' -m 'xcat base' /tmp/initrd.$$.gz"); move("$rootimg_dir/tmp/initrd.$$.gz","$destdir/initrd.gz");