mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-18 12:20:40 +00:00
support site.httpport in ubuntu diskless (#5865)
This commit is contained in:
@ -235,6 +235,11 @@ unless ($onlyinitrd) {
|
||||
my @pkgdir_internet; #Put all the http mirror in ths array, but only the first http mirror which will be used to create bootstrap
|
||||
my @pkgdir_local; #Put all directories except first in this array
|
||||
my $masternode = xCAT::TableUtils->get_site_Master();
|
||||
my $httpport="80";
|
||||
my @hports=xCAT::TableUtils->get_site_attribute("httpport");
|
||||
if ($hports[0]){
|
||||
$httpport=$hports[0];
|
||||
}
|
||||
$srcdir = undef;
|
||||
foreach my $dir (@srcdirs) {
|
||||
if ($dir =~ /^http.*/) {
|
||||
@ -246,7 +251,7 @@ unless ($onlyinitrd) {
|
||||
$srcdir = $dir;
|
||||
find(\&isaptdir, <$dir/>);
|
||||
} else { #set other directory to http url
|
||||
my $osuurl = "http://$masternode$dir ./";
|
||||
my $osuurl = "http://$masternode:$httpport$dir ./";
|
||||
push @pkgdir_local, $osuurl;
|
||||
}
|
||||
}
|
||||
@ -347,7 +352,7 @@ unless ($onlyinitrd) {
|
||||
open($aptconfig, ">", "$rootimg_dir/etc/apt/sources.list");
|
||||
|
||||
if ($srcdir) {
|
||||
print $aptconfig "deb http://$masternode$srcdir $dist main\n";
|
||||
print $aptconfig "deb http://$masternode:$httpport$srcdir $dist main\n";
|
||||
}
|
||||
|
||||
foreach (@pkgdir_internet) {
|
||||
|
Reference in New Issue
Block a user