mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12017
This commit is contained in:
+2
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user