Add capability to let impemanence create the persistentStoragePath
#163
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.
Add option
createPersistentStoragePath
(bool) which, if set, creates the directorypersistentStoragePath
during activation phase. The default is set totrue
as I think this is what most people expect and also avoids some permissions mismatches (see below). If you do not agree for whatever reason, feel free to drop the commit enabling it by default.The permission mismatch might also be related to #139.
More Background
Beginning of the story is, that I bootstrapped a new system with this config:
After rebooting, cooldir was created by owned by root. It took me a while but the problem is/was that impermanence failed to create
/home/me/cooldir
inside thepersistentStoragePath
location (because that directory does not exist). However, a bind entry was created in/etc/fstab
which triggered systemd-fstab-generator to generated that mount and in the process also create the missing directories but with root permissions.With this PR the config could look like