mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 03:37:55 +00:00
Better logic to determine which packages are installed
Signed-off-by: Matthew Stidham <stidmatt@protonmail.com>
This commit is contained in:
@@ -20,9 +20,9 @@ present=(
|
||||
)
|
||||
killcommand=0
|
||||
for i in "${present[@]}"; do
|
||||
$present=$(rpm -qa | grep i)
|
||||
present=$(expr length "$(rpm -qa | grep $i)")
|
||||
if [[ $present -gt 0 ]]; then
|
||||
pass
|
||||
:
|
||||
else
|
||||
killcommand=1
|
||||
echo "Please install $i on your system"
|
||||
@@ -32,7 +32,7 @@ done
|
||||
if [[ $killcommand -gt 0 ]]; then
|
||||
exit 1
|
||||
else
|
||||
pass
|
||||
:
|
||||
fi
|
||||
|
||||
output_dir=diag_report
|
||||
|
||||
Reference in New Issue
Block a user