summaryrefslogtreecommitdiffstats
path: root/contrib/initramfs
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-05-14 14:02:11 +0200
committerBrian Behlendorf <[email protected]>2021-06-08 14:46:31 -0700
commite40ffed0217104c69df615d0562be5319e48cdc7 (patch)
tree5802ed2c833078277f6d044bbaabf01126966e64 /contrib/initramfs
parent59d91b4d10bac7597cb21394080b3f33b84e184a (diff)
Trim excess shellcheck annotations. Widen to all non-Korn scripts
Before, make shellcheck checked scripts/{commitcheck,make_gitrev,man-dates,paxcheck,zfs-helpers,zfs, zfs-tests,zimport,zloop}.sh cmd/zed/zed.d/{{all-debug,all-syslog,data-notify,generic-notify, resilver_finish-start-scrub,scrub_finish-notify, statechange-led,statechange-notify,trim_finish-notify, zed-functions}.sh,history_event-zfs-list-cacher.sh.in} cmd/zpool/zpool.d/{dm-deps,iostat,lsblk,media,ses,smart,upath} now it also checks contrib/dracut/{02zfsexpandknowledge/module-setup, 90zfs/{export-zfs,parse-zfs,zfs-needshutdown, zfs-load-key,zfs-lib,module-setup, mount-zfs,zfs-generator}}.sh.in cmd/zed/zed.d/{pool_import-led,vdev_attach-led, resilver_finish-notify,vdev_clear-led}.sh contrib/initramfs/{zfsunlock,hooks/zfs.in,scripts/local-top/zfs} tests/zfs-tests/tests/perf/scripts/prefetch_io.sh scripts/common.sh.in contrib/bpftrace/zfs-trace.sh autogen.sh Reviewed-by: John Kennedy <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12042
Diffstat (limited to 'contrib/initramfs')
-rwxr-xr-xcontrib/initramfs/hooks/zfs.in2
-rwxr-xr-xcontrib/initramfs/scripts/local-top/zfs21
2 files changed, 8 insertions, 15 deletions
diff --git a/contrib/initramfs/hooks/zfs.in b/contrib/initramfs/hooks/zfs.in
index 613593c36..32331b264 100755
--- a/contrib/initramfs/hooks/zfs.in
+++ b/contrib/initramfs/hooks/zfs.in
@@ -26,7 +26,7 @@ fi
# We use pthreads, but i-t from buster doesn't automatically
# copy this indirect dependency: this can be removed when buster finally dies.
-for libgcc in $(find /lib/ -type f -name libgcc_s.so.[1-9]); do
+find /lib/ -type f -name "libgcc_s.so.[1-9]" | while read -r libgcc; do
copy_exec "$libgcc"
done
diff --git a/contrib/initramfs/scripts/local-top/zfs b/contrib/initramfs/scripts/local-top/zfs
index e8e5cd264..6b80e9f43 100755
--- a/contrib/initramfs/scripts/local-top/zfs
+++ b/contrib/initramfs/scripts/local-top/zfs
@@ -1,18 +1,11 @@
#!/bin/sh
-PREREQ="mdadm mdrun multipath"
+# shellcheck disable=SC2154
-prereqs()
-{
- echo "$PREREQ"
-}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
+if [ "$1" = "prereqs" ]; then
+ echo mdadm mdrun multipath
exit 0
- ;;
-esac
+fi
#
@@ -20,10 +13,10 @@ esac
#
message()
{
- if [ -x /bin/plymouth ] && plymouth --ping; then
- plymouth message --text="$@"
+ if plymouth --ping 2>/dev/null; then
+ plymouth message --text="$*"
else
- echo "$@" >&2
+ echo "$*" >&2
fi
return 0
}