Fix FreeBSD $OSTYPE check

As per this bug report:
https://github.com/toniblyx/prowler/issues/693

Add detection for freebsd releases which should be similar to darwin
in that it will use GNU coreutils for date and base64.
This commit is contained in:
Pete Wright
2020-11-20 13:29:21 -08:00
parent 25a04cd59e
commit 65bbdfdd83

View File

@@ -154,7 +154,7 @@ if [ "$OSTYPE" == "linux-gnu" ] || [ "$OSTYPE" == "linux-musl" ]; then
test_tcp_connectivity() {
gnu_test_tcp_connectivity "$1" "$2" "$3"
}
elif [[ "$OSTYPE" == "darwin"* ]]; then
elif [[ "$OSTYPE" == "darwin"* ]] || [[ "$OSTYPE" == "freebsd"* ]]; then
# BSD/OSX commands compatibility
TEMP_REPORT_FILE=$(mktemp -t prowler.cred_report-XXXXXX)
# It is possible that the user has installed GNU coreutils on OS X. By default, this will make GNU commands