From d21b54c9fb52068cc9c167f2f68e0c6823b8c41e Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 11 May 2010 13:44:34 +0000 Subject: [PATCH] -Honor -i and remove hardcoded IFACES git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6059 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/rh/dracut/xcat-cmdline.sh | 1 - xCAT-server/share/xcat/netboot/rh/genimage | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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");