Skip to content
Snippets Groups Projects
Commit c1450bc3 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

yum.sh: use ph.getOSMajor

parent 9f1b6c82
Branches
No related tags found
1 merge request!375665 packages2install fix yum
...@@ -40,7 +40,7 @@ function yum.getPackageList(){ ...@@ -40,7 +40,7 @@ function yum.getPackageList(){
# get custom status # get custom status
function yum.getStatusLine(){ function yum.getStatusLine(){
typeset -i local _osversion typeset -i local _osversion
_osversion=$(awk '{ print $4 }' /etc/redhat-release | cut -f 1 -d '.') _osversion=$( ph.getOSMajor )
if [ $_osversion -ge 8 ]; then if [ $_osversion -ge 8 ]; then
if ! sudo /usr/bin/yum --security check-update 2>&1 | grep "available" ; then if ! sudo /usr/bin/yum --security check-update 2>&1 | grep "available" ; then
echo "rc = $? [Not detected on v$_osversion]" echo "rc = $? [Not detected on v$_osversion]"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment