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

fix getStatusLine

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