Browse Source

style: Whitespace and quoting for shellcheck/shfmt conformity

pull/3991/head
Ian Grant 3 years ago
parent
commit
9032fb99c7
  1. 6
      deploy/hpilo.sh

6
deploy/hpilo.sh

@ -68,19 +68,19 @@ hpilo_deploy() {
_info "Attempting to deploy certificate '$_ccert' to '$Le_Deploy_ilo_host'" _info "Attempting to deploy certificate '$_ccert' to '$Le_Deploy_ilo_host'"
ilo_credentials="${Le_Deploy_ilo_username}:${Le_Deploy_ilo_password}" ilo_credentials="${Le_Deploy_ilo_username}:${Le_Deploy_ilo_password}"
_secure_debug "HPILO_USERNAME:HPILO_PASSWORD" $ilo_credentials
_secure_debug "HPILO_USERNAME:HPILO_PASSWORD" "$ilo_credentials"
ilo_credentials_encoded=$(printf "%s" "$ilo_credentials" | _base64) ilo_credentials_encoded=$(printf "%s" "$ilo_credentials" | _base64)
export _H1="Authorization: Basic ${ilo_credentials_encoded}" export _H1="Authorization: Basic ${ilo_credentials_encoded}"
_debug3 _H1 "$_H1" _debug3 _H1 "$_H1"
ilo_redfish_httpscert_uri="https://${Le_Deploy_ilo_host}/redfish/v1/Managers/1/SecurityService/HttpsCert/" ilo_redfish_httpscert_uri="https://${Le_Deploy_ilo_host}/redfish/v1/Managers/1/SecurityService/HttpsCert/"
_debug2 ilo_redfish_httpscert_uri "$ilo_redfish_httpscert_uri" _debug2 ilo_redfish_httpscert_uri "$ilo_redfish_httpscert_uri"
ilo_redfish_httpscert_body="{ \"Action\": \"ImportCertificate\", \"Certificate\": \"$(cat "$_ccert")\" }" ilo_redfish_httpscert_body="{ \"Action\": \"ImportCertificate\", \"Certificate\": \"$(cat "$_ccert")\" }"
# Do not check for a valid SSL certificate, because initially the cert is not valid, so it could not install the LE generated certificate # Do not check for a valid SSL certificate, because initially the cert is not valid, so it could not install the LE generated certificate
export HTTPS_INSECURE=1 export HTTPS_INSECURE=1
_post "$ilo_redfish_httpscert_body" "$ilo_redfish_httpscert_uri" "" "POST" "application/json" _post "$ilo_redfish_httpscert_body" "$ilo_redfish_httpscert_uri" "" "POST" "application/json"
_ret="$?" _ret="$?"

Loading…
Cancel
Save