version 1.5, 2004/11/19 20:46:07
|
version 1.6, 2007/04/23 20:04:54
|
Line 53 use lib '/home/httpd/lib/perl/';
|
Line 53 use lib '/home/httpd/lib/perl/';
|
use LONCAPA::Configuration; |
use LONCAPA::Configuration; |
my $loncapa_config=LONCAPA::Configuration::read_conf('loncapa.conf'); |
my $loncapa_config=LONCAPA::Configuration::read_conf('loncapa.conf'); |
|
|
my $yum_status = |
open(DSH,"$$loncapa_config{'lonDaemons'}/distprobe |"); |
&update_file('/etc/yum.conf', |
my $dist = <DSH>; |
[{section => 'loncapa-updates-i386', |
chomp($dist); |
|
close(DSH); |
|
|
|
my $yum_status; |
|
if ($dist =~ /^fedora\d+$/) { |
|
$yum_status = |
|
&update_file('/etc/yum.conf', |
|
[{section => 'loncapa-updates-$basearch', |
key => 'name=', |
key => 'name=', |
value => 'Fedora Core $releasever LON-CAPA i386 Updates', |
value => 'Fedora Core $releasever LON-CAPA $basearch Updates', |
}, {section => 'loncapa-updates-i386', |
}, {section => 'loncapa-updates-$basearch', |
key => 'baseurl=', |
key => 'baseurl=', |
value => 'http://install.loncapa.org/fedora/linux/loncapa/'. |
value => 'http://install.loncapa.org/fedora/linux/loncapa/'. |
'$releasever/i386', |
'$releasever/$basearch', |
}, {section => 'loncapa-updates-i386', |
}, {section => 'loncapa-updates-$basearch', |
key => 'gpgcheck=', |
key => 'gpgcheck=', |
value => '0', |
value => '0', |
}, {section => 'loncapa-updates-noarch', |
}, {section => 'loncapa-updates-noarch', |
Line 76 my $yum_status =
|
Line 83 my $yum_status =
|
key => 'gpgcheck=', |
key => 'gpgcheck=', |
value => '0', |
value => '0', |
}]); |
}]); |
|
} elsif ($dist =~ /^rhes(\d+)$/) { |
|
if ($1 > 4) { |
|
$yum_status = |
|
&update_file('/etc/yum.conf', |
|
[{section => 'loncapa-updates-$basearch', |
|
key => 'name=', |
|
value => 'RHEL $releasever LON-CAPA $basearch Updates', |
|
}, {section => 'loncapa-updates-$basearch', |
|
key => 'baseurl=', |
|
value => 'http://install.loncapa.org/redhat/linux/loncapa/'. |
|
'$releasever/$basearch', |
|
}, {section => 'loncapa-updates-$basearch', |
|
key => 'gpgcheck=', |
|
value => '1', |
|
}, {section => 'loncapa-updates-$basearch', |
|
key => 'gpgkey=', |
|
value => 'http://install.loncapa.org/versions/redhat/'. |
|
'RHEL/RPM-GPG-KEY-loncapa', |
|
}, {section => 'loncapa-updates-noarch', |
|
key => 'name=', |
|
value => 'RHEL $releasever LON-CAPA noarch Updates', |
|
}, {section => 'loncapa-updates-noarch', |
|
key => 'baseurl=', |
|
value => 'http://install.loncapa.org/redhat/linux/loncapa/'. |
|
'$releasever/noarch', |
|
}, {section => 'loncapa-updates-noarch', |
|
key => 'gpgcheck=', |
|
value => '1', |
|
}, {section => 'loncapa-updates-noarch', |
|
key => 'gpgkey=', |
|
value => 'http://install.loncapa.org/versions/redhat/'. |
|
'RHEL/RPM-GPG-KEY-loncapa', |
|
}]); |
|
} |
|
} |
|
|
my $mysql_global_status = |
my $mysql_global_status = |
&update_file('/etc/my.cnf', |
&update_file('/etc/my.cnf', |