From e3f0b457241aae70a31e55acc75a233cdafd6c62 Mon Sep 17 00:00:00 2001 From: Tristan PILAT Date: Fri, 22 Mar 2019 17:21:08 +0100 Subject: [PATCH] Let's use the proper tools to check if a package is present --- evocheck.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/evocheck.sh b/evocheck.sh index e6a6044..0ca7a3c 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -275,7 +275,10 @@ if [ "$IS_HISTORY" = 1 ]; then fi if [ "$IS_VIM" = 1 ]; then - command -v vim 2>1 >> /dev/null || echo 'IS_VIM FAILED!' + pkg_info | grep -q vim || echo 'IS_VIM FAILED!' + if [[ "$VERBOSE" == 1 ]]; then + echo "vim is not installed! Please add with pkg_add vim" + fi fi if [ "$IS_TTYC0SECURE" = 1 ]; then @@ -298,7 +301,10 @@ if [ "$IS_SUDOMAINT" = 1 ]; then fi if [ "$IS_POSTGRESQL" = 1 ]; then - pkg info | grep -q postgresql-client || echo 'IS_POSTGRESQL FAILED!' + pkg_info | grep -q postgresql-client || echo 'IS_POSTGRESQL FAILED!' + if [[ "$VERBOSE" == 1 ]]; then + echo "postgresql-client is not installed! Please add with pkg_add postgresql-client" + fi fi if [ "$IS_NRPE" = 1 ]; then