diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm
index c91742f7c..9eb971ff5 100644
--- a/xCAT-server/lib/perl/xCAT/Template.pm
+++ b/xCAT-server/lib/perl/xCAT/Template.pm
@@ -298,6 +298,8 @@ sub subvars {
my $source_in_pre;
my $writerepo;
my $c = 0;
+ my $space10 = " " x 10;
+ my $space12 = " " x 12;
foreach my $pkgdir (@pkgdirs) {
if ($platform =~ /^(rh|SL|centos|ol|fedora|rocky)$/) {
if ($c == 0) {
@@ -350,13 +352,14 @@ sub subvars {
$product_name=$subdir;
}
if (defined($product_name) && defined($product_dir)){
- $source .="http://XCATNEXTSERVERHOOK$httpportsuffix$pkgdir$product_name/$product_dir";
+ $source .="\n$space12http://XCATNEXTSERVERHOOK$httpportsuffix$pkgdir\n$space12$product_name\n$space12/$product_dir\n$space12\n$space10";
}
}
}
}
$c++;
}
+ $source =~ s/\s+$//; # trim end of string
$inc =~ s/#INSTALL_SOURCES#/$source/g;
$inc =~ s/#INSTALL_SOURCES_IN_PRE#/$source_in_pre/g;
if (("ubuntu" eq $platform) || ("debian" eq $platform)) {