mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-03-14 06:16:17 +03:00
zed.d, contrib: fix shellcheck errors in scripts
Not sure why this was not caught by CI; perhaps my shellcheck is new enough to catch more things. Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
This commit is contained in:
parent
e28d980d68
commit
3c4193333b
@ -21,6 +21,7 @@ zed_check_cmd "${ZFS}" sort diff
|
|||||||
|
|
||||||
# We lock the output file to avoid simultaneous writes.
|
# We lock the output file to avoid simultaneous writes.
|
||||||
# If we run into trouble, log and drop the lock
|
# If we run into trouble, log and drop the lock
|
||||||
|
# shellcheck disable=SC2329
|
||||||
abort_alter() {
|
abort_alter() {
|
||||||
zed_log_msg "Error updating zfs-list.cache for ${ZEVENT_POOL}!"
|
zed_log_msg "Error updating zfs-list.cache for ${ZEVENT_POOL}!"
|
||||||
zed_unlock "${FSLIST}"
|
zed_unlock "${FSLIST}"
|
||||||
|
|||||||
@ -97,7 +97,7 @@ fi
|
|||||||
if [ "$(zpool get -Ho value feature@encryption "${ZFS_POOL}")" = 'active' ]; then
|
if [ "$(zpool get -Ho value feature@encryption "${ZFS_POOL}")" = 'active' ]; then
|
||||||
# if the root dataset has encryption enabled
|
# if the root dataset has encryption enabled
|
||||||
ENCRYPTIONROOT="$(zfs get -Ho value encryptionroot "${ZFS_DATASET}")"
|
ENCRYPTIONROOT="$(zfs get -Ho value encryptionroot "${ZFS_DATASET}")"
|
||||||
if ! [ "${ENCRYPTIONROOT}" = "-" ]; then
|
if [ "${ENCRYPTIONROOT}" != "-" ]; then
|
||||||
KEYSTATUS="$(zfs get -Ho value keystatus "${ENCRYPTIONROOT}")"
|
KEYSTATUS="$(zfs get -Ho value keystatus "${ENCRYPTIONROOT}")"
|
||||||
# if the key needs to be loaded
|
# if the key needs to be loaded
|
||||||
if [ "$KEYSTATUS" = "unavailable" ]; then
|
if [ "$KEYSTATUS" = "unavailable" ]; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user