From fb84e5b1d2d7f068637a220e7d4c628f07bc6c10 Mon Sep 17 00:00:00 2001 From: datajerk Date: Thu, 24 Apr 2008 16:06:50 +0000 Subject: [PATCH] Updated genimage for rh/centos/fedora only to support NFS, and robust wget. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1184 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../share/xcat/netboot/rh/genimage | 90 +++++++++++++------ 1 file changed, 65 insertions(+), 25 deletions(-) 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"); } -