Skip to content

Commit

Permalink
HPCC-23772 Fix setupPKI issue with #_ in compname and file ownership
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Gardner <[email protected]>
  • Loading branch information
Michael-Gardner committed Jun 16, 2020
1 parent 5b80483 commit 901fb7b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions initfiles/bash/etc/init.d/setupPKI.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ envfile="${CONFIG_DIR}/${ENV_XML_FILE}"

OIFS=$IFS
IFS=$'\n'
compArray=($(${sbin_path}/configgen -env ${envfile} -listall | awk 'BEGIN { FS=",";} {print $2;}'))
compArray=($(${sbin_path}/configgen -env ${envfile} -listall | awk 'BEGIN { FS=",";} {print $2;}' | sort | uniq))
IFS=$OIFS

if [ ${#compArray[@]} -eq 0 ]; then
Expand Down Expand Up @@ -73,7 +73,7 @@ fi
for i in "" ${compArray[@]} ; do
compName=""
if [ "$i" != "" ]; then
compName=""${i#*_}
compName=""${i}
fi
if [ "${compName}" != "" ]; then
compNamePrint=${compName}
Expand Down Expand Up @@ -124,4 +124,6 @@ else
log_success_msg
fi

chown -R ${USER_NAME}:${USER_NAME} ${homePath}

exit 0

0 comments on commit 901fb7b

Please sign in to comment.