Fix entrypoint.sh creating one folder named {plugins,embedded-db}#1
Merged
Conversation
Member
|
Thanks for the fix. Indeed, both the test and prod scripts test the images with a workflow creating first the directory. So that was under the radar. |
dereckson
approved these changes
Oct 13, 2020
| sudo -HEu "${OPENFIRE_USER}" cp -a /etc/openfire "${OPENFIRE_DATA_DIR}/conf" | ||
| fi | ||
| sudo -HEu "${OPENFIRE_USER}" mkdir -p "${OPENFIRE_DATA_DIR}/{plugins,embedded-db}" | ||
| sudo -HEu "${OPENFIRE_USER}" mkdir -p "${OPENFIRE_DATA_DIR}"/{plugins,embedded-db} |
Summary:
To allow spaces in variables like OPENFIRE_DATA_DIR, they have been enclosed
in quotes.
As the expression uses GNU coreutils mkdir {} syntax, put the {} in quotes
has broken the directory creation: instead to create /path/to/openfire/plugins
and /path/to/openfire/embedded-db, it created the exact quoted content.
That breaks new installations when directories don't exist.
This change fixes that regression. This is a follow-up for e76b3cf.
Test Plan:
```
$ export OPENFIRE_DATA_DIR=/tmp/openfire
$ mkdir -p "${OPENFIRE_DATA_DIR}"/{plugins,embedded-db}
$ ls $OPENFIRE_DATA_DIR
embedded-db plugins
```
Reviewers: dereckson
Reviewed By: dereckson
Differential Revision: https://devcentral.nasqueron.org/D2372
Member
|
Thanks for this correction, that indeed broke the image when not an update. In October, there is the hacktoberfest with the challenge to submit 4 pull requests to various GitHub repositories. If you want to participate and get a t-shirt or plant a tree, make 3 more contributions to any project :) More information at |
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.
New install fails to start because required directories are not being created.