50 lines
1.3 KiB
Diff
50 lines
1.3 KiB
Diff
|
From 13fc0a77b1b676b172f2bf85f44901b8fd832ab8 Mon Sep 17 00:00:00 2001
|
||
|
From: Philipp Rudo <prudo@redhat.com>
|
||
|
Date: Tue, 13 Aug 2024 17:01:55 +0200
|
||
|
Subject: [PATCH 14/16] mkdumprd: drop check for dracut option
|
||
|
--squash-compressor
|
||
|
|
||
|
The option --squash-compressor was introduced with dracut 057 but the
|
||
|
minimal required dracut version in the Fedora spec file is dracut >=058.
|
||
|
So we can safely assume that the option is always present.
|
||
|
|
||
|
Signed-off-by: Philipp Rudo <prudo@redhat.com>
|
||
|
---
|
||
|
kdump-lib.sh | 6 ------
|
||
|
mkdumprd | 2 +-
|
||
|
2 files changed, 1 insertion(+), 7 deletions(-)
|
||
|
|
||
|
diff --git a/kdump-lib.sh b/kdump-lib.sh
|
||
|
index f46c2e9..ba853d9 100755
|
||
|
--- a/kdump-lib.sh
|
||
|
+++ b/kdump-lib.sh
|
||
|
@@ -58,12 +58,6 @@ has_command()
|
||
|
[[ -x $(command -v "$1") ]]
|
||
|
}
|
||
|
|
||
|
-dracut_have_option()
|
||
|
-{
|
||
|
- local _option=$1
|
||
|
- ! dracut "$_option" 2>&1 | grep -q "unrecognized option"
|
||
|
-}
|
||
|
-
|
||
|
perror_exit()
|
||
|
{
|
||
|
derror "$@"
|
||
|
diff --git a/mkdumprd b/mkdumprd
|
||
|
index e01682d..517ce19 100644
|
||
|
--- a/mkdumprd
|
||
|
+++ b/mkdumprd
|
||
|
@@ -379,7 +379,7 @@ done <<< "$(kdump_read_conf)"
|
||
|
handle_default_dump_target
|
||
|
|
||
|
if ! have_compression_in_dracut_args; then
|
||
|
- if is_squash_available && dracut_have_option "--squash-compressor"; then
|
||
|
+ if is_squash_available; then
|
||
|
dracut_args+=("--squash-compressor" "zstd")
|
||
|
elif has_command zstd; then
|
||
|
dracut_args+=("--compress" "zstd")
|
||
|
--
|
||
|
2.46.1
|
||
|
|