summaryrefslogtreecommitdiffstats
path: root/kubernetes/common
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2021-09-08 09:39:24 +0000
committerGerrit Code Review <gerrit@onap.org>2021-09-08 09:39:24 +0000
commit6b6df44c23816874b9d138825ca1522492fe0a1d (patch)
tree6fee05bc9f168366a4e23445630e7473e2f98b3e /kubernetes/common
parentbbdbda860f17381d7da042056d4a30fe3cd8844c (diff)
parent639768edbe0fbeb61c0aac0a74510b663f33a9fd (diff)
Merge "[COMMON] Fix bashisms in import-custom-cert"
Diffstat (limited to 'kubernetes/common')
-rwxr-xr-xkubernetes/common/cert-wrapper/resources/import-custom-certs.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh b/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
index 6df7505e7b..eb07a74cd4 100755
--- a/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
+++ b/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
@@ -37,10 +37,10 @@ for f in $CERTS_DIR/*; do
# Dont use onap truststore when aaf is disabled
continue
fi
- if [ ${f: -3} = ".sh" ]; then
+ if echo $f | grep '\.sh$' >/dev/null; then
continue
fi
- if [ ${f: -4} = ".b64" ]
+ if echo $f | grep '\.b64$' >/dev/null; then
then
base64 -d $f > $WORK_DIR/`basename $f .b64`
else
@@ -49,8 +49,7 @@ for f in $CERTS_DIR/*; do
done
for f in $MORE_CERTS_DIR/*; do
- if [ ${f: -4} == ".pem" ]
- then
+ if echo $f | grep '\.pem$' >/dev/null; then
cp $f $WORK_DIR/.
fi
done
@@ -67,7 +66,7 @@ fi
# Import Custom Certificates
for f in $WORK_DIR/*; do
- if [ ${f: -4} = ".pem" ]; then
+ if echo $f | grep '\.pem$' >/dev/null; then
echo "importing certificate: $f"
keytool -import -file $f -alias `basename $f` -keystore $WORK_DIR/$TRUSTSTORE_OUTPUT_FILENAME -storepass $TRUSTSTORE_PASSWORD -noprompt
if [ $? != 0 ]; then