Fix openrc source when invoked with bash nounset option
This change fixes the check for the --no-credentials argument to handle
the case where no argument is present and nounset is active, i.e.:
set -o nounset
In this case we default $1 to "" via ${1:-}
Test Plan:
Pass:
- Build and source the /etc/platform/openrc file with and without
arguments. Test with and without the nounset option.
Reviewed: https:/ /review. opendev. org/c/starlingx /stx-puppet/ +/907063 /opendev. org/starlingx/ stx-puppet/ commit/ 2e60f12f29f62d1 697c624e1755c9a 8185443bc5
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 2e60f12f29f62d1 697c624e1755c9a 8185443bc5
Author: Kyle MacLeod <email address hidden>
Date: Mon Jan 29 08:49:30 2024 -0500
Fix openrc source when invoked with bash nounset option
This change fixes the check for the --no-credentials argument to handle
the case where no argument is present and nounset is active, i.e.:
set -o nounset
In this case we default $1 to "" via ${1:-}
Test Plan:
Pass: openrc file with and without
- Build and source the /etc/platform/
arguments. Test with and without the nounset option.
Closes-Bug: 2051549
Change-Id: Iab7f21d26751b0 24bf58c41b16aac 79daa351abf
Signed-off-by: Kyle MacLeod <email address hidden>