add allowed entries for pkgdir to have http, so that we can have external repos
* This will only work though has more than one repo defined, where the first one is the local one
This commit is contained in:
parent
f7d1f6c17b
commit
ca7cc188a0
@ -205,18 +205,23 @@ sub subvars {
|
||||
my $source_in_pre;
|
||||
my $c = 0;
|
||||
foreach my $pkgdir(@pkgdirs) {
|
||||
my $http = "http://#TABLE:noderes:\$NODE:nfsserver#$pkgdir";
|
||||
my $http2 = "http://'\$nextserver'$pkgdir";
|
||||
if ( $pkgdir =~ /^http/ ) {
|
||||
$http = $pkgdir;
|
||||
$http2 = $pkgdir;
|
||||
}
|
||||
if( $platform =~ /^(rh|SL|centos|fedora)$/ ) {
|
||||
if ( $c == 0 ) {
|
||||
# After some tests, if we put the repo in pre scripts in the kickstart like for rhels6.x
|
||||
# the rhels5.9 will not be installed successfully. So put in kickstart directly.
|
||||
$source_in_pre .= "echo 'url --url http://'\$nextserver'/$pkgdir' >> /tmp/repos";
|
||||
$source .= "url --url http://#TABLE:noderes:\$NODE:nfsserver#/$pkgdir\n"; #For rhels5.9
|
||||
$source_in_pre .= "echo 'url --url $http2 >> /tmp/repos";
|
||||
$source .= "url --url $http\n"; #For rhels5.9
|
||||
} else {
|
||||
$source_in_pre .= "\necho 'repo --name=pkg$c --baseurl=http://'\$nextserver'/$pkgdir' >> /tmp/repos";
|
||||
$source .= "repo --name=pkg$c --baseurl=http://#TABLE:noderes:\$NODE:nfsserver#/$pkgdir\n"; #for rhels5.9
|
||||
$source_in_pre .= "\necho 'repo --name=pkg$c --baseurl=$http2' >> /tmp/repos";
|
||||
$source .= "repo --name=pkg$c --baseurl=$http\n"; #for rhels5.9
|
||||
}
|
||||
} elsif ($platform =~ /^(sles|suse)/) {
|
||||
my $http = "http://#TABLE:noderes:\$NODE:nfsserver#$pkgdir";
|
||||
$source .= " <listentry>
|
||||
<media_url>$http</media_url>
|
||||
<product>SuSE-Linux-pkg$c</product>
|
||||
@ -224,7 +229,7 @@ sub subvars {
|
||||
<ask_on_error config:type=\"boolean\">false</ask_on_error> <!-- available since openSUSE 11.0 -->
|
||||
<name>SuSE-Linux-pkg$c</name> <!-- available since openSUSE 11.1/SLES11 (bnc#433981) -->
|
||||
</listentry>";
|
||||
$source_in_pre .="<listentry><media_url>http://'\$nextserver'$pkgdir</media_url><product>SuSE-Linux-pkg$c</product><product_dir>/</product_dir><ask_on_error config:type=\"boolean\">false</ask_on_error><name>SuSE-Linux-pkg$c</name></listentry>";
|
||||
$source_in_pre .="<listentry><media_url>$http2</media_url><product>SuSE-Linux-pkg$c</product><product_dir>/</product_dir><ask_on_error config:type=\"boolean\">false</ask_on_error><name>SuSE-Linux-pkg$c</name></listentry>";
|
||||
}
|
||||
$c++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user