54 lines
1.5 KiB
Diff
54 lines
1.5 KiB
Diff
|
From 6fca9109dadc087265ccd785fbd60003ea69318c Mon Sep 17 00:00:00 2001
|
||
|
From: Philipp Rudo <prudo@redhat.com>
|
||
|
Date: Tue, 13 Aug 2024 16:29:39 +0200
|
||
|
Subject: [PATCH 09/16] mkdumprd: fix shellcheck warnings
|
||
|
|
||
|
Fix the shellcheck warnings for mkdumprd. With this
|
||
|
|
||
|
$ shellcheck -x mkdumprd
|
||
|
|
||
|
now returns without finding.
|
||
|
|
||
|
Signed-off-by: Philipp Rudo <prudo@redhat.com>
|
||
|
---
|
||
|
mkdumprd | 8 ++++++--
|
||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/mkdumprd b/mkdumprd
|
||
|
index 27eed5e..7a35217 100644
|
||
|
--- a/mkdumprd
|
||
|
+++ b/mkdumprd
|
||
|
@@ -11,8 +11,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
|
||
|
export IN_KDUMP=1
|
||
|
|
||
|
@@ -32,6 +35,7 @@ MKDUMPRD_TMPDIR="$(mktemp -d -t mkdumprd.XXXXXX)"
|
||
|
[ -d "$MKDUMPRD_TMPDIR" ] || perror_exit "dracut: mktemp -p -d -t dracut.XXXXXX failed."
|
||
|
MKDUMPRD_TMPMNT="$MKDUMPRD_TMPDIR/target"
|
||
|
|
||
|
+# shellcheck disable=SC2154
|
||
|
trap '
|
||
|
ret=$?;
|
||
|
is_mounted $MKDUMPRD_TMPMNT && umount -f $MKDUMPRD_TMPMNT;
|
||
|
@@ -256,7 +260,7 @@ check_user_configured_target()
|
||
|
verify_core_collector()
|
||
|
{
|
||
|
local _cmd="${1%% *}"
|
||
|
- local _params="${1#${_cmd}}"
|
||
|
+ local _params="${1#"${_cmd}"}"
|
||
|
|
||
|
if [[ $_cmd != "makedumpfile" ]]; then
|
||
|
if is_raw_dump_target; then
|
||
|
--
|
||
|
2.46.1
|
||
|
|