Skip to content

Commit

Permalink
fix(sztp): fix colon parsing
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb authored Jun 6, 2024
1 parent 879c5d8 commit bcaadef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sztp/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export SBI_EE_CERT_B64=$(openssl enc -base64 -A -in cert_chain.cms)
export CLIENT_CERT_TA_B64=$(openssl enc -base64 -A -in ta_cert_chain.cms)

names+=(SZTPD_INIT_ADDR SZTPD_INIT_PORT SZTPD_NBI_PORT SZTPD_SBI_PORT)
export SZTPD_INIT_ADDR=$(awk '/SZTPD_INIT_ADDR/{print $2}' ../docker-compose.yml)
export SZTPD_INIT_PORT=$(awk '/SZTPD_INIT_PORT/{print $2}' ../docker-compose.yml)
export SZTPD_NBI_PORT=$(awk '/SZTPD_NBI_PORT/{print $2}' ../docker-compose.yml)
export SZTPD_SBI_PORT=$(awk '/SZTPD_SBI_PORT/{print $2}' ../docker-compose.yml)
export SZTPD_INIT_ADDR=$(awk '/SZTPD_INIT_ADDR:/{print $2}' ../docker-compose.yml)
export SZTPD_INIT_PORT=$(awk '/SZTPD_INIT_PORT:/{print $2}' ../docker-compose.yml)
export SZTPD_NBI_PORT=$(awk '/SZTPD_NBI_PORT:/{print $2}' ../docker-compose.yml)
export SZTPD_SBI_PORT=$(awk '/SZTPD_SBI_PORT:/{print $2}' ../docker-compose.yml)

envsubst "$(printf '${%s} ' ${names[@]})" < template.json > config.json

Expand Down

0 comments on commit bcaadef

Please sign in to comment.