Skip to content

Commit

Permalink
Merge pull request #498 from MahnoorAsghar/read-htpasswd-m3-main
Browse files Browse the repository at this point in the history
🌱 Fix error in reading ironic htpasswd from file
  • Loading branch information
metal3-io-bot authored Apr 25, 2024
2 parents cfac9aa + 4a2baed commit c0f25a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/auth-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ fi
set +x
IRONIC_HTPASSWD_FILE=/etc/ironic/htpasswd
if [[ -f "/auth/ironic/username" ]]; then
read -r IRONIC_HTPASSWD_USERNAME<"/auth/ironic/username"
IRONIC_HTPASSWD_USERNAME=$(</auth/ironic/username)
fi
IRONIC_HTPASSWD_USERNAME=${IRONIC_HTPASSWD_USERNAME:-}
if [[ -f "/auth/ironic/password" ]]; then
read -r IRONIC_HTPASSWD_PASSWORD<"/auth/ironic/password"
IRONIC_HTPASSWD_PASSWORD=$(</auth/ironic/password)
fi
IRONIC_HTPASSWD_PASSWORD=${IRONIC_HTPASSWD_PASSWORD:-}
if [[ -n "${IRONIC_HTPASSWD_USERNAME}" ]]; then
Expand Down

0 comments on commit c0f25a3

Please sign in to comment.