--- loncom/build/CHECKRPMS 2006/10/05 21:11:25 1.5 +++ loncom/build/CHECKRPMS 2007/06/28 13:30:06 1.8 @@ -39,7 +39,7 @@ to LON-CAPA systems. distprobe is used t The utility which is used to complete the check depends on the distro: -fedora - yum +fedora, rhel 5/5+, centos, scientific - yum suse 9.X and sles9 - you suse 10.X and sles10 - rug rhel 4 - up2date @@ -80,7 +80,7 @@ if ($distro =~ /^fedora\d+$/) { $cmd = 'yum update'; &prepare_msg($tmpfile,$cmd); ($send,$addsubj) = &check_with_yum($tmpfile); -} elsif ($distro =~ /^(suse|sles)9\.\d$/) { +} elsif ($distro =~ /^(suse|sles)9\.?\d?$/) { $cmd = 'you'; &prepare_msg($tmpfile,$cmd); ($send,$addsubj) = &check_with_you($tmpfile); @@ -88,10 +88,25 @@ if ($distro =~ /^fedora\d+$/) { $cmd = 'rug up'; &prepare_msg($tmpfile,$cmd); ($send,$addsubj) = &check_with_rug($tmpfile); -} elsif ($distro =~ /^rhes4$/) { - $cmd ='up2date -u --nox'; +} elsif ($distro =~ /^rhes(\d+)$/) { + my $version = $1; + if ($version == 4) { + $cmd ='up2date -u --nox'; + &prepare_msg($tmpfile,$cmd); + ($send,$addsubj) = &check_with_up2date($tmpfile); + } elsif ($version > 4) { + $cmd = 'yum update'; + &prepare_msg($tmpfile,$cmd); + ($send,$addsubj) = &check_with_yum($tmpfile); + } +} elsif ($distro =~ /^centos\d+$/) { + $cmd = 'yum update'; &prepare_msg($tmpfile,$cmd); - ($send,$addsubj) = &check_with_up2date($tmpfile); + ($send,$addsubj) = &check_with_yum($tmpfile); +} elsif ($distro =~ /^scientific\d+\.\d$/) { + $cmd = 'yum update'; + &prepare_msg($tmpfile,$cmd); + ($send,$addsubj) = &check_with_yum($tmpfile); } else { $cmd = '/usr/local/bin/check-rpms --update'; ($send,$addsubj) = &check_with_checkrpms($tmpfile);