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
cba14153
Commit
cba14153
authored
3 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
check_packages2install - update docs
parent
9610acf5
Branches
Branches containing commit
No related tags found
1 merge request
!19
check_packages2install - update docs
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
check_packages2install
+4
-3
4 additions, 3 deletions
check_packages2install
check_packages2install-pkgmanager/pamac.sh
+1
-0
1 addition, 0 deletions
check_packages2install-pkgmanager/pamac.sh
check_packages2install-pkgmanager/yum.sh
+1
-1
1 addition, 1 deletion
check_packages2install-pkgmanager/yum.sh
with
6 additions
and
4 deletions
check_packages2install
+
4
−
3
View file @
cba14153
...
@@ -148,7 +148,8 @@ function _detectPkgManager(){
...
@@ -148,7 +148,8 @@ function _detectPkgManager(){
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# show grouped packages by category
# show grouped packages by category
# OOPS: uses global vars :-/
# global string dir_filter directory where to find filters
# global string packagemanOut output of update lister command
function
showFilteredPackages
(){
function
showFilteredPackages
(){
# filtered package view
# filtered package view
...
@@ -159,8 +160,7 @@ function showFilteredPackages(){
...
@@ -159,8 +160,7 @@ function showFilteredPackages(){
filterAll
=
""
filterAll
=
""
# show filtered view
# show filtered view
local
_selfdir
=
$(
dirname
"
$0
"
)
for
filterfile
in
$(
find
"
$dir_filter
"
-name
"*txt"
|
sort
)
for
filterfile
in
$(
find
$dir_filter
-name
"*txt"
|
sort
)
do
do
# get group name from filename
# get group name from filename
filtername
=
$(
echo
"
$filterfile
"
| rev |
cut
-f
1
-d
"/"
| rev |
sed
"s#.txt
\$
##g"
|
sed
"s#^[0-9]*_##g"
)
filtername
=
$(
echo
"
$filterfile
"
| rev |
cut
-f
1
-d
"/"
| rev |
sed
"s#.txt
\$
##g"
|
sed
"s#^[0-9]*_##g"
)
...
@@ -221,6 +221,7 @@ if [ -z "$pkgmanager" ]; then
...
@@ -221,6 +221,7 @@ if [ -z "$pkgmanager" ]; then
ph.abort
"UNKNOWN: the package manager was not detected/ is not supported."
ph.abort
"UNKNOWN: the package manager was not detected/ is not supported."
fi
fi
# load functions for the detected package manager
.
"
${
dir_pkg
}
/
${
pkgmanager
}
.sh"
||
exit
2
.
"
${
dir_pkg
}
/
${
pkgmanager
}
.sh"
||
exit
2
packagemanOut
=
$(
${
pkgmanager
}
GetUpdates
)
packagemanOut
=
$(
${
pkgmanager
}
GetUpdates
)
...
...
This diff is collapsed.
Click to expand it.
check_packages2install-pkgmanager/pamac.sh
+
1
−
0
View file @
cba14153
...
@@ -19,6 +19,7 @@ function pamacGetUpdates(){
...
@@ -19,6 +19,7 @@ function pamacGetUpdates(){
# ---------------------------------------------------------------
# ---------------------------------------------------------------
# extract list of packages 2 install
# extract list of packages 2 install
# global string packagemanOut output of update lister command
function
pamacPackages
(){
function
pamacPackages
(){
echo
"
$packagemanOut
"
|
grep
--
'->'
echo
"
$packagemanOut
"
|
grep
--
'->'
}
}
...
...
This diff is collapsed.
Click to expand it.
check_packages2install-pkgmanager/yum.sh
+
1
−
1
View file @
cba14153
...
@@ -41,7 +41,7 @@ function yumStatus(){
...
@@ -41,7 +41,7 @@ function yumStatus(){
}
}
# ---------------------------------------------------------------
# ---------------------------------------------------------------
# extract count of critical
# extract count of critical
packages
# param string text to extract critical counter from
# param string text to extract critical counter from
function
yumCritical
(){
function
yumCritical
(){
local
summary
=
"
$1
"
local
summary
=
"
$1
"
...
...
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