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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
icinga-checks
Commits
c1450bc3
Commit
c1450bc3
authored
2 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
yum.sh: use ph.getOSMajor
parent
9f1b6c82
Branches
Branches containing commit
No related tags found
1 merge request
!37
5665 packages2install fix yum
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_packages2install-pkgmanager/yum.sh
+1
-1
1 addition, 1 deletion
check_packages2install-pkgmanager/yum.sh
with
1 addition
and
1 deletion
check_packages2install-pkgmanager/yum.sh
+
1
−
1
View file @
c1450bc3
...
@@ -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
]"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment