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
b9c2973b
Commit
b9c2973b
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Plain Diff
Merge branch '7043-fix-yum-again' into 'master'
next try See merge request
!247
parents
4cf050d2
034ba212
Branches
Branches containing commit
No related tags found
1 merge request
!247
next try
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_packages2install-pkgmanager/yum.sh
+13
-13
13 additions, 13 deletions
check_packages2install-pkgmanager/yum.sh
with
13 additions
and
13 deletions
check_packages2install-pkgmanager/yum.sh
+
13
−
13
View file @
b9c2973b
...
...
@@ -58,25 +58,25 @@ function yum.getStatusLine(){
fi
;;
8|9
)
sudo
/usr/bin/yum
--bugfix
check-update 2>&1 |
tail
-1
#
sudo /usr/bin/yum --bugfix check-update 2>&1 | tail -1
# if ! sudo /usr/bin/yum --security check-update 2>&1 | grep "available" ; then
# echo "No update available. rc = $?"
# fi
# ;;
# 9)
#
local _total; _total=$( grep -c . <<< "${packages2install}" )
#
local _sec; _sec=$( sudo /usr/bin/yum -y --security check-update \
#
| grep -v "^Last" \
#
| grep -v "^No security updates needed" \
#
| grep -c "[a-z]"
#
)
local
_total
;
_total
=
$(
grep
-c
.
<<<
"
${
packages2install
}
"
)
local
_sec
;
_sec
=
$(
sudo
/usr/bin/yum
-y
--security
check-update
\
|
grep
-v
"^Last"
\
|
grep
-v
"^No security updates needed"
\
|
grep
-c
"[a-z]"
)
#
# create a status line like in former yum versions
#
if [ -z "$_sec" ]; then
#
echo "No packages needed for security; ${_total} packages available"
#
else
#
echo "$_sec package(s) needed for security, out of $_total available"
#
fi
# create a status line like in former yum versions
if
[
-z
"
$_sec
"
]
;
then
echo
"No packages needed for security;
${
_total
}
packages available"
else
echo
"
$_sec
package(s) needed for security, out of
$_total
available"
fi
;;
*
)
echo
"see below ... version
${
_osversion
}
not implemented yet..."
...
...
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