Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fixes multiple issues with shell scripts: - current shell code is hardly readable because of too much unoptimized code - some bugs (like openzfs#9168) - inconsistent coding style - very much missing documentation - use of eva... evil() where it is not needed at all, e.g.: `eval export FSTAB_dev_$i="$fs"` - duplicated functionality: in_mtab vs. is_mounted - inconsistent use of mount and cat/read /proc/self/mounts (which both return the same results. the only differene is that mount does some formatting (insert on and type, put options in brackets, omitting freq and pass) - caching of fstab and mtab in env makes everything very, very complicated and is not needed at all; (as far as I looked at the code; MAYBE this is really needed and I did not get this far, yet. we'll see) IMHO it really does not matter if we call grep multiple times... the difference is negligible and should be in the range of some 10s or 100s of milliseconds... This PR does a complete rework of all existing shell scripts to fix all those problems while keeping backwards compatibility. Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
- Loading branch information