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:
наб
2021-05-14 06:47:53 +02:00
committed by GitHub
parent fce29d6aa4
commit 5236eafdcd
3 changed files with 44 additions and 112 deletions
+4 -12
View File
@@ -1,17 +1,9 @@
#!/bin/sh
PREREQ="dropbear"
prereqs() {
echo "$PREREQ"
}
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
if [ "$1" = "prereqs" ]; then
echo "dropbear"
exit
fi
. /usr/share/initramfs-tools/hook-functions