[WIP] module-setup.sh: catch installation failures, warn or fail as appropriate #72
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.
By default,
checknow always returns255to prevent automatic installation of the dracut module; it must be explicitly requested or pulled in as a dependency.installnow checks the exit codes of all critical installation commands and, for files that absolutely must exist in the initramfs, failure to install will trigger a dracut failure. For a few optional files, warnings are emitted but installation continues. We can argue about the specific "essential" executables, but most are required in the early parts ofzfsbootmenu.shthat will get to the point of automatically booting a kernel and, for some others likegrep, they should definitely be in the image to ensure that the emergency shell has important functionality in the event the menuing system cannot be displayed or some other critical error occurs. (These commands should be sufficient to at least set abootfsor, for those with a deeper understanding, drive the ZBMkexecsequence manually---this has saved me a few times!)When we merge
skim_support,fzfwill have to be special-cased to fallback toskand, if that isn't available, emit the warning.I'm marking WIP because this is totally untested but looks functional and because I want to get some feedback before we really dive in here.
NB: I've dropped the
/usr/binprefix from the ZFS executables. I'm not sure why they were there in the first place, but it's another point that needs testing.