Skip to content

Commit

Permalink
fix(install): Fixed bugs in postInstall script that prevent spinnaker…
Browse files Browse the repository at this point in the history
… user from being created if it does not already exist, and thus causing halyard service to fail to start (#1959)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
ashleykleynhans and mergify[bot] authored Aug 17, 2022
1 parent 535b5eb commit 35e25db
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion halyard-web/pkg_scripts/postInstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ then
HAL_USER=$(cat /opt/spinnaker/config/halyard-user)
else
HAL_USER=spinnaker
# Temporarily prevent commands that return non-zero exit codes
# from causing the post installation to fail.
set +e
getent passwd spinnaker > /dev/null
if [ $? -gt 0 ]; then
GETENT_RESULT=$?
# Reenable checking for non-zero exit codes.
set -e
if [ $GETENT_RESULT -ne 0 ]; then
useradd -s /bin/bash $HAL_USER
fi
if [ ! -f "/opt/spinnaker/config/halyard-user" ];
Expand Down

0 comments on commit 35e25db

Please sign in to comment.