diff --git a/userspace/falco/verify_engine_fields.sh b/userspace/falco/verify_engine_fields.sh index fa9d8996..37b3189c 100644 --- a/userspace/falco/verify_engine_fields.sh +++ b/userspace/falco/verify_engine_fields.sh @@ -5,16 +5,16 @@ set -euo pipefail SOURCE_DIR=$1 OPENSSL=$2 -if ! command -v ${OPENSSL} version > /dev/null 2>&1; then +if ! command -v "${OPENSSL}" version > /dev/null 2>&1; then echo "No openssl command at ${OPENSSL}" exit 1 fi NEW_CHECKSUM=$(./falco --list -N | ${OPENSSL} dgst -sha256 | awk '{print $2}') -CUR_CHECKSUM=$(grep FALCO_FIELDS_CHECKSUM ${SOURCE_DIR}/userspace/engine/falco_engine_version.h | awk '{print $3}' | sed -e 's/"//g') +CUR_CHECKSUM=$(grep FALCO_FIELDS_CHECKSUM "${SOURCE_DIR}/userspace/engine/falco_engine_version.h" | awk '{print $3}' | sed -e 's/"//g') -if [ $NEW_CHECKSUM != $CUR_CHECKSUM ]; then +if [ "$NEW_CHECKSUM" != "$CUR_CHECKSUM" ]; then echo "Set of fields supported has changed (new checksum $NEW_CHECKSUM != old checksum $CUR_CHECKSUM)." echo "Update checksum and/or version in falco_engine_version.h." exit 1