diff options
author | Đoàn Trần Công Danh <[email protected]> | 2020-11-29 02:02:08 +0700 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-28 11:02:08 -0800 |
commit | 16692e6ba0bc3b0b6e7d64a68e91ded9f2d0959e (patch) | |
tree | 9f06b307d2ffb072e17f66cb56b12a072bf07fae /Makefile.am | |
parent | 04a82e043d067181a8b352921ef6a3c3ac875b59 (diff) |
dracut: use /bin/sh instead of bash as the intepreter
Despite that dracut has a hard dependency on bash,
its modules doesn't, dracut only has a hard dependency on bash for
module-setup (on a fully usable machine). Inside initramfs, dracut
allows users choose from a list of handful other shells, e.g. bash,
busybox, dash, mkfsh.
In fact, my local machine's initramfs is being built with dash,
and it's functional for a very long time.
Before 64025fa3a (Silence 'make checkbashisms', 2020-08-20), we also
allows our users to have that right, too.
Let's fix the problem 'make checkbashisms' reported and allows our users
to have that right, again.
For 'plymouth' case, let's simply run the command inside the if instead
of checking for the existence of command before running it, because the
status is also failture if plymouth is unavailable.
While we're at it, let's remove an unnecessary fork for grep in
zfs-generator.sh.in and its following complicated 'if elif fi' with
a simple 'case ... esac'.
To support this change, also exclude 90zfs from "make checkbashisms"
because the current CI infrastructure ships an old version of
"checkbashisms", which complains about "command -v", while the current
latest "checkbashisms" thinks it's fine. In the near future, we can
revert that change to "Makefile.am" when CI infrastructure is updated.
Reviewed-by: Gabriel A. Devenyi <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Đoàn Trần Công Danh <[email protected]>
Closes #11244
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index eac1a3e97..436b78d76 100644 --- a/Makefile.am +++ b/Makefile.am @@ -159,6 +159,7 @@ checkbashisms: -o -name 'smart' -prune \ -o -name 'paxcheck.sh' -prune \ -o -name 'make_gitrev.sh' -prune \ + -o -name '90zfs' -prune \ -o -type f ! -name 'config*' \ ! -name 'libtool' \ -exec sh -c 'awk "NR==1 && /\#\!.*bin\/sh.*/ {print FILENAME;}" "{}"' \;); \ |