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.
This is a little messy: that includes a lot of whitespace change,
but I couldn't really figure out a better way to do it, in general.
(A better way would have been something like:
... but the functions are generally too long for that kind of hack to
work at all. Alternatively, I figured it might be good to have a
generic
system()
wrapper, but I haven't dug deep enough in the codeto see if it's always called the same way, or if that would make
sense.)
This doesn't block all
system()
calls either: only those whoactually make changes. SSH setup commands and commands that just probe
the snapshot lists are let through, so this is not completely a
--noop
flag (hence the--dryrun
instead), because itactually does some things still.
I have only grepped for
system()
and haven't audited the entiresource code to see if other side effects (e.g. creating files) also
exist.
Disclaimer: this patch was briefly tested on my home system, and my
level of familiarity with sanoid is "beginner".
Closes: #11