diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index b325b3728..0e5f38ddd 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -52,6 +52,7 @@ sub subvars { my $media_dir = shift; my $platform=shift; my $partitionfile=shift; + my $os=shift; my %namedargs = @_; #further expansion of this function will be named arguments, should have happened sooner. unless ($namedargs{reusemachinepass}) { $lastmachinepassdata->{password}=""; @@ -111,8 +112,15 @@ sub subvars { if ( defined($media_dir) ) { @pkgdirs = split(",", $media_dir); my $source; - my $c = 0; + my $c = 0; foreach my $pkgdir(@pkgdirs) { + # For rhels5.9, the os base repo should be url + # and the repo repository will be the additional. + if ( $c == 0 && $os =~ /^rhels5/) { + $source .= "url --url http://#TABLE:noderes:\$NODE:nfsserver#/$pkgdir\n"; + $c++; + next; + } if( $platform =~ /^(rh|SL)$/ ) { $source .= "repo --name=pkg$c --baseurl=http://#TABLE:noderes:\$NODE:nfsserver#/$pkgdir\n"; } elsif ($platform =~ /^(sles|suse)/) {