Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
icinga-checks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
icinga-checks
Merge requests
!36
fix getStatusLine
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
fix getStatusLine
5665-packages2install-fix-yum
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Hahn Axel (hahn)
requested to merge
5665-packages2install-fix-yum
into
master
2 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
a07c7b92
1 commit,
2 years ago
1 file
+
4
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
check_packages2install-pkgmanager/yum.sh
+
4
−
4
View file @ a07c7b92
Edit in single-file editor
Open in Web IDE
Show full file
@@ -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