From d6d9da7af734e38280a4eebd40e2cf43799ccffc Mon Sep 17 00:00:00 2001 From: Coiby Xu Date: Thu, 6 Mar 2025 16:47:57 +0800 Subject: [PATCH] ima-setup: fix two shellcheck warnings Relates: https://issues.redhat.com/browse/RHEL-82392 Conflict: None Upstream Status: https://src.fedoraproject.org/rpms/ima-evm-utils.git commit 7b800d82d0947fd0e75e92997a3aec7af079c1cc Author: Coiby Xu Date: Tue Feb 25 13:24:33 2025 +0800 ima-setup: fix two shellcheck warnings Fix the following two shellcheck warnings, In ima-setup.sh line 36: echo "$policy_file doesn't exist" ^----------^ SC2154 (warning): policy_file is referenced but not assigned. In ima-setup.sh line 41: reinstall_threshold=${_opt#*=} ^-----------------^ SC2034 (warning): reinstall_threshold appears unused. Verify use (or export if used externally). Signed-off-by: Coiby Xu Signed-off-by: Coiby Xu --- ima-setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ima-setup.sh b/ima-setup.sh index 3fa8b34..4a61a28 100755 --- a/ima-setup.sh +++ b/ima-setup.sh @@ -33,7 +33,7 @@ for _opt in "$@"; do --policy=*) ima_policy_path=${_opt#*=} if [[ ! -e $ima_policy_path ]]; then - echo "$policy_file doesn't exist" + echo "$ima_policy_path doesn't exist" exit 1 fi ;; @@ -61,7 +61,7 @@ if test -f /run/ostree-booted; then echo "You are using OSTree, please enable IMA signatures as part of the OSTree creation process." else echo "Adding IMA signatures to installed package files" - if ! ima-add-sigs; then + if ! ima-add-sigs --reinstall_threshold="$reinstall_threshold"; then echo "Failed to add IMA signatures, abort" exit 1 fi