From 9b378cdf859f7378f26a0e86d43bedd19d9c9899 Mon Sep 17 00:00:00 2001 From: phamt Date: Tue, 2 Apr 2013 20:26:28 +0000 Subject: [PATCH] Enabled remote Linux repositories to be specified in noderes.nfsserver. When specified, noderes.nfsserver will be used instead of the local /install directory. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15798 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/zvm.pm | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index 300fe0102..5f210aa75 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -5174,7 +5174,7 @@ END # UseVNC=1 VNCPassword=12345678 # InstNetDev=osa OsaInterface=qdio OsaMedium=eth Manual=0 if (!$repo) { - $repo = "http://$nfs/$os/s390x/1/"; + $repo = "http://$nfs/$os/s390x/1"; } my $ay = "http://$nfs/custom/install/sles/" . $node . "." . $profile . ".tmpl"; @@ -5206,8 +5206,15 @@ END # Send kernel, parmfile, and initrd to reader to HCP $kernelFile = "/tmp/" . $node . "Kernel"; $initFile = "/tmp/" . $node . "Initrd"; - $out = `cp $installDir/$os/s390x/1/boot/s390x/vmrdr.ikr $kernelFile`; - $out = `cp $installDir/$os/s390x/1/boot/s390x/initrd $initFile`; + + if ($repo) { + $out = `/usr/bin/wget $repo/boot/s390x/vmrdr.ikr -O $kernelFile --no-check-certificate`; + $out = `/usr/bin/wget $repo/boot/s390x/initrd -O $initFile --no-check-certificate`; + } else { + $out = `cp $installDir/$os/s390x/1/boot/s390x/vmrdr.ikr $kernelFile`; + $out = `cp $installDir/$os/s390x/1/boot/s390x/initrd $initFile`; + } + xCAT::zvmUtils->sendFile( $::SUDOER, $hcp, $kernelFile, $kernelFile ); xCAT::zvmUtils->sendFile( $::SUDOER, $hcp, $parmFile, $parmFile ); xCAT::zvmUtils->sendFile( $::SUDOER, $hcp, $initFile, $initFile ); @@ -5297,7 +5304,7 @@ END # Edit template if (!$repo) { - $repo = "http://$nfs/$os/s390x/"; + $repo = "http://$nfs/$os/s390x"; } $out = @@ -5480,8 +5487,15 @@ END $kernelFile = "/tmp/" . $node . "Kernel"; $initFile = "/tmp/" . $node . "Initrd"; - $out = `cp $installDir/$os/s390x/images/kernel.img $kernelFile`; - $out = `cp $installDir/$os/s390x/images/initrd.img $initFile`; + # Copy over kernel, parmfile, conf, and initrd from remote repository + if ($repo) { + $out = `/usr/bin/wget $repo/images/kernel.img -O $kernelFile --no-check-certificate`; + $out = `/usr/bin/wget $repo/images/initrd.img -O $initFile --no-check-certificate`; + } else { + $out = `cp $installDir/$os/s390x/images/kernel.img $kernelFile`; + $out = `cp $installDir/$os/s390x/images/initrd.img $initFile`; + } + xCAT::zvmUtils->sendFile( $::SUDOER, $hcp, $kernelFile, $kernelFile ); xCAT::zvmUtils->sendFile( $::SUDOER, $hcp, $parmFile, $parmFile ); xCAT::zvmUtils->sendFile( $::SUDOER, $hcp, $initFile, $initFile );