Switch the init command and lifecycle hook from /bin/sh to /bin/bash#1060
Open
FrederikNJS wants to merge 1 commit into
Open
Switch the init command and lifecycle hook from /bin/sh to /bin/bash#1060FrederikNJS wants to merge 1 commit into
FrederikNJS wants to merge 1 commit into
Conversation
The current scripts are invalid when using /bin/sh. Specifically the `[[` syntax is not valid. This syntax is however supported in /bin/bash.
FrederikNJS
commented
Jul 14, 2026
| - "-c" | ||
| - | | ||
| /opt/keyfactor/bin/start.sh & | ||
| until [ -f /opt/keyfactor/appserver/standalone/deployments/ejbca.ear.deployed ]; do sleep 5; done |
Author
There was a problem hiding this comment.
This is not valid in /bin/sh, but is in /bin/bash.
FrederikNJS
commented
Jul 14, 2026
| {{- end }} | ||
| {{- if and (hasKey .Values.ejbca "superadminPasswordOverride") (eq .Values.ejbca.env.TLS_SETUP_ENABLED "true") }} | ||
| until [ -f /opt/keyfactor/appserver/standalone/deployments/ejbca.ear.deployed ]; do sleep 5; done | ||
| until [[ $(/opt/keyfactor/bin/ejbca.sh roles listadmins --role "Super Administrator Role" | grep -v 'USERNAME TYPE_EQUALCASE "ejbca"') ]]; do sleep 5; done |
Author
There was a problem hiding this comment.
This is not valid in /bin/sh, but is in /bin/bash.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current scripts are invalid when using /bin/sh. Specifically the
[[syntax is not valid. This syntax is however supported in /bin/bash.Describe your changes
When running the helm chart, the init container fails to run, and throws as error because the syntax of the command is incorrect for /bin/sh. I have switched the shell to using /bin/bash, where the syntax is correct.
How has this been tested?
We ran the helm chart with the change, and it no longer fails.
Checklist before requesting a review
See also Contributing Guidelines.