summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-05-14 06:47:53 +0200
committerBrian Behlendorf <[email protected]>2021-06-08 14:44:35 -0700
commitd53a6969c106cc06a8064dabc3161364e7e04ba9 (patch)
tree646049fcc0c1c1f170e6130903ee77e89de08834 /Makefile.am
parent019739b6e98ba4cf79e492ff8ba63d9aeb111894 (diff)
i-t: rewrite hooks
This produces a leaner image, doesn't fail if zdb doesn't exist, properly handles hostnameless systems, doesn't mention crypto modules for no reason, doesn't add useless empty executable in hopes an eight-year-old PR is merged, uses i-t builtins for all copies Also optimize the checkbashisms filter to spawn one (or a few) awks instead of one per regular file and remove initramfs/hooks therefrom due to a command -v false positive Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12017
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index c44d64df0..32ac50f78 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -159,9 +159,10 @@ checkbashisms:
-o -name 'paxcheck.sh' -prune \
-o -name 'make_gitrev.sh' -prune \
-o -name '90zfs' -prune \
+ -o -path '*initramfs/hooks' -prune \
-o -type f ! -name 'config*' \
! -name 'libtool' \
- -exec sh -c 'awk "NR==1 && /#!.*bin\/sh.*/ {print FILENAME;}" "{}"' \;); \
+ -exec awk 'FNR==1 && /^#!.*bin\/sh/ {print FILENAME}' {} \+); \
else \
echo "skipping checkbashisms because checkbashisms is not installed"; \
fi