From 62507fbe0e3a97cb101f00812be75c5ad8c28ea7 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 19 Jun 2012 20:17:42 +0000 Subject: [PATCH] Prepare to have http/https switchable and non-default http ports git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13128 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/anaconda.pm | 10 ++++++---- xCAT-server/lib/xcat/plugins/sles.pm | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index fd0a96e1c..5ad3e4f40 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -26,6 +26,8 @@ use Socket; use strict; my @cpiopid; +my $httpmethod="http"; +my $httpport="80"; @@ -548,7 +550,7 @@ sub mknetboot $kcmdline = "NFSROOT=$nfssrv:$nfsdir STATEMNT="; } } else { - $kcmdline = "imgurl=http://$imgsrv/$rootimgdir/rootimg-statelite.gz STATEMNT="; + $kcmdline = "imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/rootimg-statelite.gz STATEMNT="; } # add support for subVars in the value of "statemnt" @@ -608,7 +610,7 @@ sub mknetboot } else { $kcmdline = - "imgurl=http://$imgsrv/$rootimgdir/rootimg.$suffix "; + "imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/rootimg.$suffix "; $kcmdline .= "XCAT=$xcatmaster:$xcatdport "; } @@ -1099,8 +1101,8 @@ sub mkinstall $instserver=$ent->{nfsserver}; } my $kcmdline = - "quiet repo=http://$instserver/install/$os/$arch/ ks=http://" - . $instserver + "quiet repo=$httpmethod://$instserver:$httpport/install/$os/$arch/ ks=$httpmethod://" + . $instserver . ":". $httpport . "/install/autoinst/" . $node; if ($maxmem) { diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 8bae78143..476823ae1 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -20,6 +20,8 @@ Getopt::Long::Configure("pass_through"); use File::Path; use File::Copy; use File::Temp qw/mkdtemp/; +my $httpmethod = "http"; +my $httpport = "80"; use Socket; @@ -420,7 +422,7 @@ sub mknetboot "NFSROOT=$nfssrv:$nfsdir STATEMNT="; } else { $kcmdline = - "imgurl=http://$imgsrv/$rootimgdir/rootimg-statelite.gz STATEMNT="; + "imgurl=$httpmethod://$imgsrv/$rootimgdir/rootimg-statelite.gz STATEMNT="; } # add support for subVars in the value of "statemnt" my $statemnt=""; @@ -467,7 +469,7 @@ sub mknetboot else { $kcmdline = - "imgurl=http://$imgsrv/$rootimgdir/rootimg.$suffix "; + "imgurl=$httpmethod://$imgsrv/$rootimgdir/rootimg.$suffix "; } $kcmdline .= "XCAT=$xcatmaster:$xcatdport quiet "; @@ -837,11 +839,11 @@ sub mkinstall $netserver = $ent->{nfsserver}; } my $kcmdline = - "quiet autoyast=http://" + "quiet autoyast=$httpmethod://" . $netserver . "$installroot/autoinst/" . $node - . " install=http://" + . " install=$httpmethod://" . $netserver . "$pkgdir/1";