Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IML Open Source
icinga-checks
Commits
cba14153
Commit
cba14153
authored
Jun 03, 2022
by
Hahn Axel (hahn)
Browse files
check_packages2install - update docs
parent
9610acf5
Changes
3
Hide whitespace changes
Inline
Side-by-side
check_packages2install
View file @
cba14153
...
...
@@ -148,7 +148,8 @@ function _detectPkgManager(){
# ----------------------------------------------------------------------
# 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
(){
# filtered package view
...
...
@@ -159,8 +160,7 @@ function showFilteredPackages(){
filterAll
=
""
# 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
# get group name from filename
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
ph.abort
"UNKNOWN: the package manager was not detected/ is not supported."
fi
# load functions for the detected package manager
.
"
${
dir_pkg
}
/
${
pkgmanager
}
.sh"
||
exit
2
packagemanOut
=
$(
${
pkgmanager
}
GetUpdates
)
...
...
check_packages2install-pkgmanager/pamac.sh
View file @
cba14153
...
...
@@ -19,6 +19,7 @@ function pamacGetUpdates(){
# ---------------------------------------------------------------
# extract list of packages 2 install
# global string packagemanOut output of update lister command
function
pamacPackages
(){
echo
"
$packagemanOut
"
|
grep
--
'->'
}
...
...
check_packages2install-pkgmanager/yum.sh
View file @
cba14153
...
...
@@ -41,7 +41,7 @@ function yumStatus(){
}
# ---------------------------------------------------------------
# extract count of critical
# extract count of critical
packages
# param string text to extract critical counter from
function
yumCritical
(){
local
summary
=
"
$1
"
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment