diff --git a/xCAT-server-2.0/share/xcat/netboot/rh/genimage b/xCAT-server-2.0/share/xcat/netboot/rh/genimage index d4db3c822..11d1981c1 100755 --- a/xCAT-server-2.0/share/xcat/netboot/rh/genimage +++ b/xCAT-server-2.0/share/xcat/netboot/rh/genimage @@ -4,6 +4,7 @@ use File::Path; use File::Copy; use File::Find; use Getopt::Long; +#use strict; Getopt::Long::Configure("bundling"); Getopt::Long::Configure("pass_through"); @@ -185,30 +186,57 @@ sub mkinitrd { foreach (@ndrivers) { print $inifile "insmod /lib/$_\n"; } - print $inifile "netstart\n"; - print $inifile "cd /\n"; - print $inifile "for i in `cat /proc/cmdline`; do\n"; - print $inifile " KEY=`echo \$i |awk -F= '{print \$1}'`\n"; - print $inifile " if [ \"\$KEY\" == 'imgurl' ]; then\n"; - print $inifile " VALUE=`echo \$i |awk -F= '{print \$2}'`\n"; - print $inifile " if [ \"http\" == \"`echo \$VALUE|awk -F: '{print \$1}'`\" ]; then\n"; - print $inifile " wget \$VALUE\n"; - print $inifile " fi\n"; - print $inifile " fi\n"; - print $inifile "done\n"; - print $inifile "if [ -r /rootimg.sfs ]; then\n"; - print $inifile " echo Setting up squashfs with ram overlay\n"; - print $inifile " mknod /dev/loop0 b 7 0\n"; - print $inifile " mkdir -p /ro\n"; - print $inifile " mkdir -p /rw\n"; - print $inifile " mount -t squashfs /rootimg.sfs /ro\n"; - if ($rootlimit) { - print $inifile " mount -o size=$rootlimit -t tmpfs rw /rw\n"; - } else { - print $inifile " mount -t tmpfs rw /rw\n"; - } - print $inifile " mount -t aufs -o dirs=/rw:/ro mergedroot /sysroot\n"; + print $inifile <,"$installroot/netboot/$osver/$arch/$profile/kernel"); } -