45 lines
1.2 KiB
Diff
45 lines
1.2 KiB
Diff
|
From f2e4123828e8b0fd02c87fcc62089ee68891bf7d Mon Sep 17 00:00:00 2001
|
||
|
From: Philipp Rudo <prudo@redhat.com>
|
||
|
Date: Wed, 14 Aug 2024 12:39:28 +0200
|
||
|
Subject: [PATCH 10/16] mkfadumprd: fix shellcheck warnings
|
||
|
|
||
|
Fix the shellcheck warnings for mkfadumprd. With this
|
||
|
|
||
|
$ shellcheck -x mkfadumprd
|
||
|
|
||
|
now returns without finding.
|
||
|
|
||
|
Signed-off-by: Philipp Rudo <prudo@redhat.com>
|
||
|
---
|
||
|
mkfadumprd | 6 +++++-
|
||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/mkfadumprd b/mkfadumprd
|
||
|
index dd6840f..2fd09ad 100755
|
||
|
--- a/mkfadumprd
|
||
|
+++ b/mkfadumprd
|
||
|
@@ -7,8 +7,11 @@ if [[ -f /etc/sysconfig/kdump ]]; then
|
||
|
fi
|
||
|
|
||
|
[[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut
|
||
|
-. $dracutbasedir/dracut-functions.sh
|
||
|
+# shellcheck source=/dev/null
|
||
|
+. "$dracutbasedir"/dracut-functions.sh
|
||
|
+# shellcheck source=SCRIPTDIR/kdump-lib.sh
|
||
|
. /lib/kdump/kdump-lib.sh
|
||
|
+# shellcheck source=SCRIPTDIR/kdump-logger.sh
|
||
|
. /lib/kdump/kdump-logger.sh
|
||
|
|
||
|
#initiate the kdump logger
|
||
|
@@ -19,6 +22,7 @@ fi
|
||
|
|
||
|
MKFADUMPRD_TMPDIR="$(mktemp -d -t mkfadumprd.XXXXXX)"
|
||
|
[ -d "$MKFADUMPRD_TMPDIR" ] || perror_exit "mkfadumprd: mktemp -d -t mkfadumprd.XXXXXX failed."
|
||
|
+# shellcheck disable=SC2154
|
||
|
trap '
|
||
|
ret=$?;
|
||
|
[[ -d $MKFADUMPRD_TMPDIR ]] && rm --one-file-system -rf -- "$MKFADUMPRD_TMPDIR";
|
||
|
--
|
||
|
2.46.1
|
||
|
|