From 6593090a8c29a6f710027d16e435dfe5243980db Mon Sep 17 00:00:00 2001 From: Matthew Stidham Date: Fri, 26 Mar 2021 14:01:54 -0700 Subject: [PATCH] Better logic to determine which packages are installed Signed-off-by: Matthew Stidham --- wifi_diag/do_wifi_diag.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wifi_diag/do_wifi_diag.bash b/wifi_diag/do_wifi_diag.bash index 978ce883..fd79bf6a 100755 --- a/wifi_diag/do_wifi_diag.bash +++ b/wifi_diag/do_wifi_diag.bash @@ -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