summaryrefslogtreecommitdiffstats
path: root/packages/policy-xacmlpdp-tarball
diff options
context:
space:
mode:
authorTaka Cho <takamune.cho@att.com>2020-11-30 15:45:06 -0500
committerTaka Cho <takamune.cho@att.com>2020-11-30 16:03:49 -0500
commit31a7298832a19765799db74124ff9dae4e8c189d (patch)
tree495ba549835aa10ebb41bd2704500f047d9eafaa /packages/policy-xacmlpdp-tarball
parent0cb4533da05a301e294e943b46f46692d53f9dcd (diff)
move all bash to ash shell scripts - xacml
bash scripts convert to ash Issue-ID: POLICY-2847 Change-Id: I181e353997d8874eaadd73d6c39594c04a856e4c Signed-off-by: Taka Cho <takamune.cho@att.com>
Diffstat (limited to 'packages/policy-xacmlpdp-tarball')
-rw-r--r--packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh16
1 files changed, 6 insertions, 10 deletions
diff --git a/packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh b/packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh
index b64c89da..75175db4 100644
--- a/packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh
+++ b/packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh
@@ -1,7 +1,7 @@
-#!/bin/bash
+#!/usr/bin/env ash
#
# ============LICENSE_START=======================================================
-# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
# Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,8 +25,7 @@ SQL_FILE="${POLICY_HOME}/mysql/sql/createguardtable.sql"
sed 's/\\//g' "${POLICY_HOME}"/apps/guard/xacml.properties > /tmp/temp.xacml.properties
# Remove temp file
-if [ ! -f /tmp/temp.xacml.properties ]
- then
+if [ ! -f /tmp/temp.xacml.properties ]; then
echo "Temporary guard xacml properties file not found!"
exit 1
fi
@@ -39,20 +38,17 @@ DB_PASSWORD=$(awk -F= '$1 == "javax.persistence.jdbc.password" { print $2 }' /tm
# Remove temp file
rm /tmp/temp.xacml.properties
-if [ -z "$DB_HOSTNAME" ]
- then
+if [ -z "$DB_HOSTNAME" ]; then
echo "No Mariadb host provided in guard xacml.properties."
exit 2
fi
-if [ -z "$DB_USERNAME" ]
- then
+if [ -z "$DB_USERNAME" ]; then
echo "No Mariadb username provided in guard xacml.properties."
exit 2
fi
-if [ -z "$DB_PASSWORD" ]
- then
+if [ -z "$DB_PASSWORD" ]; then
echo "No Mariadb password provided in guard xacml.properties."
exit 2
fi