32 lines
967 B
Diff
32 lines
967 B
Diff
|
From a891ae527aaf3c015d3b4b0290655b89fdf8f03d Mon Sep 17 00:00:00 2001
|
||
|
From: Pavel Valena <pvalena@redhat.com>
|
||
|
Date: Thu, 8 Aug 2024 01:30:50 +0200
|
||
|
Subject: [PATCH 11/24] fix(dracut-functions): allow for \ in get_maj_min file
|
||
|
path
|
||
|
|
||
|
as the path might be f.e. /dev/disk/by-partlabel/EFI\x20System\x20Partition
|
||
|
|
||
|
which would produce Warning 'grep: warning: stray \ before x' in get_maj_min
|
||
|
|
||
|
Resolves: RHEL-47145
|
||
|
---
|
||
|
dracut-functions.sh | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||
|
index f9e5d3bc..c8cb2e15 100755
|
||
|
--- a/dracut-functions.sh
|
||
|
+++ b/dracut-functions.sh
|
||
|
@@ -243,7 +243,7 @@ get_maj_min() {
|
||
|
local _out
|
||
|
|
||
|
if [[ $get_maj_min_cache_file ]]; then
|
||
|
- _out="$(grep -m1 -oE "^$1 \S+$" "$get_maj_min_cache_file" | awk '{print $NF}')"
|
||
|
+ _out="$(grep -m1 -oE "^${1//\\/\\\\} \S+$" "$get_maj_min_cache_file" | awk '{print $NF}')"
|
||
|
fi
|
||
|
|
||
|
if ! [[ "$_out" ]]; then
|
||
|
--
|
||
|
2.42.0
|
||
|
|