summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Kraynev <skraynev@mirantis.com>2016-08-03 12:30:12 +0300
committerAlexey Khivin <akhivin@gmail.com>2016-08-08 20:14:56 +0000
commita4a52e5b54d93c8e648444dac2bdf97d86f28bc3 (patch)
tree0e5c8302d7a12bf26de1d169f55b84879f78c2cc
parent6dcb389223256f5c516311044d510b3947d1094c (diff)
Fix errors reported by shellcheck for SystemConfig and OpenLDAP
Notes
Notes (review): Code-Review+2: Nikolay Mahotkin <nmakhotkin@mirantis.com> Code-Review+2: Alexey Khivin <akhivin@gmail.com> Code-Review+1: Kirill Zaitsev <kzaitsev@mirantis.com> Workflow+1: Alexey Khivin <akhivin@gmail.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 08 Aug 2016 20:39:00 +0000 Reviewed-on: https://review.openstack.org/350494 Project: openstack/ci-cd-pipeline-app-murano Branch: refs/heads/master
-rw-r--r--murano-apps/OpenLDAP/package/Resources/scripts/configureOpenLDAPUser.sh12
-rw-r--r--murano-apps/SystemConfig/package/Resources/scripts/deploy.sh14
2 files changed, 13 insertions, 13 deletions
diff --git a/murano-apps/OpenLDAP/package/Resources/scripts/configureOpenLDAPUser.sh b/murano-apps/OpenLDAP/package/Resources/scripts/configureOpenLDAPUser.sh
index 21abb2c..57d70f3 100644
--- a/murano-apps/OpenLDAP/package/Resources/scripts/configureOpenLDAPUser.sh
+++ b/murano-apps/OpenLDAP/package/Resources/scripts/configureOpenLDAPUser.sh
@@ -8,20 +8,20 @@ EMAIL="$6"
8 8
9DOMAIN_PASSWORD="$ADMIN_PASSWORD" 9DOMAIN_PASSWORD="$ADMIN_PASSWORD"
10 10
11NAME="`echo "$DOMAIN" | cut -d. -f1`" 11NAME="$(echo "$DOMAIN" | cut -d. -f1)"
12TLD="`echo "$DOMAIN" | cut -d. -f2`" 12TLD="$(echo "$DOMAIN" | cut -d. -f2)"
13 13
14# If user doesn't specify non-admin username/password then 14# If user doesn't specify non-admin username/password then
15# script will create just admin user 15# script will create just admin user
16 16
17if [ -z $USERNAME ]; 17if [ -z "$USERNAME" ];
18 then 18 then
19 USERNAME="$ADMIN_USERNAME"; 19 USERNAME="$ADMIN_USERNAME";
20 PASSWORD="$ADMIN_PASSWORD"; 20 PASSWORD="$ADMIN_PASSWORD";
21fi 21fi
22 22
23 23
24ldapadd -x -w $DOMAIN_PASSWORD -D "cn=${ADMIN_USERNAME},dc=${NAME},dc=${TLD}" << USER 24ldapadd -x -w "$DOMAIN_PASSWORD" -D "cn=${ADMIN_USERNAME},dc=${NAME},dc=${TLD}" << USER
25dn: uid=${USERNAME},ou=users,dc=${NAME},dc=${TLD} 25dn: uid=${USERNAME},ou=users,dc=${NAME},dc=${TLD}
26objectClass: top 26objectClass: top
27objectClass: posixAccount 27objectClass: posixAccount
@@ -42,7 +42,7 @@ shadowWarning: 0
42mail: ${EMAIL} 42mail: ${EMAIL}
43USER 43USER
44 44
45ldappasswd -w $DOMAIN_PASSWORD -s ${PASSWORD} -D "cn=${ADMIN_USERNAME},dc=${NAME},dc=${TLD}" -x uid=${USERNAME},ou=users,dc=${NAME},dc=${TLD} 45ldappasswd -w "$DOMAIN_PASSWORD" -s "${PASSWORD}" -D "cn=${ADMIN_USERNAME},dc=${NAME},dc=${TLD}" -x "uid=${USERNAME},ou=users,dc=${NAME},dc=${TLD}"
46 46
47# check if user been created 47# check if user been created
48ldapwhoami -x -w ${PASSWORD} -D uid=${USERNAME},ou=users,dc=${NAME},dc=${TLD} -hlocalhost -p389 48ldapwhoami -x -w "${PASSWORD}" -D "uid=${USERNAME},ou=users,dc=${NAME},dc=${TLD}" -hlocalhost -p389
diff --git a/murano-apps/SystemConfig/package/Resources/scripts/deploy.sh b/murano-apps/SystemConfig/package/Resources/scripts/deploy.sh
index 2906f09..7c663db 100644
--- a/murano-apps/SystemConfig/package/Resources/scripts/deploy.sh
+++ b/murano-apps/SystemConfig/package/Resources/scripts/deploy.sh
@@ -9,24 +9,24 @@ logger Cloning openstack-ci system-config
9repository_name="$(basename "$URL")" 9repository_name="$(basename "$URL")"
10 10
11if [ -n "$PATCH_ID" ] ; then 11if [ -n "$PATCH_ID" ] ; then
12 git clone $URL 12 git clone "$URL"
13 pushd $repository_name 13 pushd "$repository_name"
14 patch_ref=`git ls-remote | grep $PATCH_ID | tail -1 | awk '{print $2}'` 14 patch_ref=$(git ls-remote | grep "$PATCH_ID" | tail -1 | awk '{print $2}')
15 if [ -z "$patch_ref" ] ; then 15 if [ -z "$patch_ref" ] ; then
16 echo "Patch id $PATCH_ID is not correct." 16 echo "Patch id $PATCH_ID is not correct."
17 exit 1 17 exit 1
18 fi 18 fi
19 git fetch $URL $patch_ref && git checkout "FETCH_HEAD" 19 git fetch "$URL" "$patch_ref" && git checkout "FETCH_HEAD"
20 popd 20 popd
21elif [ -n "$BRANCH" ] ; then 21elif [ -n "$BRANCH" ] ; then
22 git clone $URL --branch $BRANCH 22 git clone "$URL" --branch "$BRANCH"
23else 23else
24 git clone $URL 24 git clone "$URL"
25fi 25fi
26 26
27logger Installing openstack-ci system-config 27logger Installing openstack-ci system-config
28 28
29pushd $repository_name 29pushd "$repository_name"
30 ./install_modules.sh 30 ./install_modules.sh
31 31
32 cp -r modules/ /etc/puppet/ 32 cp -r modules/ /etc/puppet/