Fix errors reported by shellcheck for SystemConfig and OpenLDAP
Change-Id: I95dd70789c28d6c9727c75ca29ee618a72ba4e27
This commit is contained in:
parent
6dcb389223
commit
a4a52e5b54
@ -8,20 +8,20 @@ EMAIL="$6"
|
||||
|
||||
DOMAIN_PASSWORD="$ADMIN_PASSWORD"
|
||||
|
||||
NAME="`echo "$DOMAIN" | cut -d. -f1`"
|
||||
TLD="`echo "$DOMAIN" | cut -d. -f2`"
|
||||
NAME="$(echo "$DOMAIN" | cut -d. -f1)"
|
||||
TLD="$(echo "$DOMAIN" | cut -d. -f2)"
|
||||
|
||||
# If user doesn't specify non-admin username/password then
|
||||
# script will create just admin user
|
||||
|
||||
if [ -z $USERNAME ];
|
||||
if [ -z "$USERNAME" ];
|
||||
then
|
||||
USERNAME="$ADMIN_USERNAME";
|
||||
PASSWORD="$ADMIN_PASSWORD";
|
||||
fi
|
||||
|
||||
|
||||
ldapadd -x -w $DOMAIN_PASSWORD -D "cn=${ADMIN_USERNAME},dc=${NAME},dc=${TLD}" << USER
|
||||
ldapadd -x -w "$DOMAIN_PASSWORD" -D "cn=${ADMIN_USERNAME},dc=${NAME},dc=${TLD}" << USER
|
||||
dn: uid=${USERNAME},ou=users,dc=${NAME},dc=${TLD}
|
||||
objectClass: top
|
||||
objectClass: posixAccount
|
||||
@ -42,7 +42,7 @@ shadowWarning: 0
|
||||
mail: ${EMAIL}
|
||||
USER
|
||||
|
||||
ldappasswd -w $DOMAIN_PASSWORD -s ${PASSWORD} -D "cn=${ADMIN_USERNAME},dc=${NAME},dc=${TLD}" -x uid=${USERNAME},ou=users,dc=${NAME},dc=${TLD}
|
||||
ldappasswd -w "$DOMAIN_PASSWORD" -s "${PASSWORD}" -D "cn=${ADMIN_USERNAME},dc=${NAME},dc=${TLD}" -x "uid=${USERNAME},ou=users,dc=${NAME},dc=${TLD}"
|
||||
|
||||
# check if user been created
|
||||
ldapwhoami -x -w ${PASSWORD} -D uid=${USERNAME},ou=users,dc=${NAME},dc=${TLD} -hlocalhost -p389
|
||||
ldapwhoami -x -w "${PASSWORD}" -D "uid=${USERNAME},ou=users,dc=${NAME},dc=${TLD}" -hlocalhost -p389
|
||||
|
@ -9,24 +9,24 @@ logger Cloning openstack-ci system-config
|
||||
repository_name="$(basename "$URL")"
|
||||
|
||||
if [ -n "$PATCH_ID" ] ; then
|
||||
git clone $URL
|
||||
pushd $repository_name
|
||||
patch_ref=`git ls-remote | grep $PATCH_ID | tail -1 | awk '{print $2}'`
|
||||
git clone "$URL"
|
||||
pushd "$repository_name"
|
||||
patch_ref=$(git ls-remote | grep "$PATCH_ID" | tail -1 | awk '{print $2}')
|
||||
if [ -z "$patch_ref" ] ; then
|
||||
echo "Patch id $PATCH_ID is not correct."
|
||||
exit 1
|
||||
fi
|
||||
git fetch $URL $patch_ref && git checkout "FETCH_HEAD"
|
||||
git fetch "$URL" "$patch_ref" && git checkout "FETCH_HEAD"
|
||||
popd
|
||||
elif [ -n "$BRANCH" ] ; then
|
||||
git clone $URL --branch $BRANCH
|
||||
git clone "$URL" --branch "$BRANCH"
|
||||
else
|
||||
git clone $URL
|
||||
git clone "$URL"
|
||||
fi
|
||||
|
||||
logger Installing openstack-ci system-config
|
||||
|
||||
pushd $repository_name
|
||||
pushd "$repository_name"
|
||||
./install_modules.sh
|
||||
|
||||
cp -r modules/ /etc/puppet/
|
||||
|
Loading…
x
Reference in New Issue
Block a user