Skip to content
Snippets Groups Projects

fix getStatusLine

Merged Hahn Axel (hahn) requested to merge 5665-packages2install-fix-yum into master
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
@@ -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
}
Loading