[bitnami/consul] Release 1.16.1-debian-11-r21 (#46762)

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Bitnami Bot
2023-08-31 15:14:13 +02:00
committed by GitHub
parent d4606a8b25
commit d330d5b8fa
3 changed files with 30 additions and 6 deletions

View File

@@ -4,7 +4,7 @@
#
# Validation functions library
# shellcheck disable=SC1091
# shellcheck disable=SC1091,SC2086
# Load Generic Libraries
. /opt/bitnami/scripts/liblog.sh
@@ -203,7 +203,7 @@ validate_ipv6() {
if [[ $ip =~ $full_address_regex || $ip =~ $short_address_regex || $ip == "::" ]]; then
stat=0
fi
return "$stat"
return $stat
}
########################
@@ -223,7 +223,7 @@ validate_ipv4() {
&& ${ip_array[2]} -le 255 && ${ip_array[3]} -le 255 ]]
stat=$?
fi
return "$stat"
return $stat
}
########################
@@ -242,7 +242,7 @@ validate_ip() {
else
stat=$(validate_ipv6 "$ip")
fi
return "$stat"
return $stat
}
########################

View File

@@ -0,0 +1,24 @@
#!/bin/sh
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
set -u
if [ $# -eq 0 ]; then
>&2 echo "No arguments provided"
exit 1
fi
script=$1
exit_code="${2:-96}"
fail_if_not_present="${3:-n}"
if test -f "$script"; then
sh $script
if [ $? -ne 0 ]; then
exit $((exit_code))
fi
elif [ "$fail_if_not_present" = "y" ]; then
>&2 echo "script not found: $script"
exit 127
fi