mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-27 04:32:16 +03:00
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 <john.kennedy@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12042
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
check() {
|
||||
# We depend on udev-rules being loaded
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2034,SC2154
|
||||
|
||||
. /lib/dracut-zfs-lib.sh
|
||||
|
||||
@@ -39,6 +40,7 @@ udevadm settle
|
||||
|
||||
if [ "${root}" = "zfs:AUTO" ] ; then
|
||||
if ! ZFS_DATASET="$(find_bootfs)" ; then
|
||||
# shellcheck disable=SC2086
|
||||
zpool import -N -a ${ZPOOL_IMPORT_OPTS}
|
||||
if ! ZFS_DATASET="$(find_bootfs)" ; then
|
||||
warn "ZFS: No bootfs attribute found in importable pools."
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2034,SC2154
|
||||
|
||||
. /lib/dracut-lib.sh
|
||||
|
||||
@@ -28,7 +29,7 @@ case "${root}" in
|
||||
info "ZFS: Enabling autodetection of bootfs after udev settles."
|
||||
;;
|
||||
|
||||
ZFS\=*|zfs:*|zfs:FILESYSTEM\=*|FILESYSTEM\=*)
|
||||
ZFS=*|zfs:*|FILESYSTEM=*)
|
||||
# root is explicit ZFS root. Parse it now. We can handle
|
||||
# a root=... param in any of the following formats:
|
||||
# root=ZFS=rpool/ROOT
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2016,SC1004
|
||||
|
||||
grep -wq debug /proc/cmdline && debug=1
|
||||
[ -n "$debug" ] && echo "zfs-generator: starting" >> /dev/kmsg
|
||||
|
||||
@@ -59,6 +59,7 @@ import_pool() {
|
||||
|
||||
if ! zpool list -H "${pool}" > /dev/null 2>&1; then
|
||||
info "ZFS: Importing pool ${pool}..."
|
||||
# shellcheck disable=SC2086
|
||||
if ! zpool import -N ${ZPOOL_IMPORT_OPTS} "${pool}" ; then
|
||||
warn "ZFS: Unable to import pool ${pool}"
|
||||
return 1
|
||||
@@ -123,13 +124,12 @@ for_relevant_root_children() {
|
||||
# export_all OPTS
|
||||
# exports all imported zfs pools.
|
||||
export_all() {
|
||||
opts="${@}"
|
||||
ret=0
|
||||
|
||||
IFS="${NEWLINE}"
|
||||
for pool in $(zpool list -H -o name) ; do
|
||||
if zpool list -H "${pool}" > /dev/null 2>&1; then
|
||||
zpool export "${pool}" ${opts} || ret=$?
|
||||
zpool export "${pool}" "$@" || ret=$?
|
||||
fi
|
||||
done
|
||||
IFS="${OLDIFS}"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
# only run this on systemd systems, we handle the decrypt in mount-zfs.sh in the mount hook otherwise
|
||||
[ -e /bin/systemctl ] || [ -e /usr/bin/systemctl ] || return 0
|
||||
|
||||
Reference in New Issue
Block a user