29 lines
992 B
Diff
29 lines
992 B
Diff
|
From 6fb0f4b4d54eeb1b1e89c06cc54bdcab504138da Mon Sep 17 00:00:00 2001
|
||
|
From: Pavel Valena <pvalena@redhat.com>
|
||
|
Date: Fri, 24 Feb 2023 19:19:59 +0100
|
||
|
Subject: [PATCH] fix(dracut.sh): kmoddir does not handle trailing /
|
||
|
|
||
|
Fixes https://github.com/dracutdevs/dracut/issues/2236
|
||
|
|
||
|
+(/) only works in bash interactive mode. Using any non-interactive
|
||
|
bash run simply doesn't remove anything.
|
||
|
|
||
|
The solution is copied from dracut-lib.sh, trim().
|
||
|
---
|
||
|
dracut.sh | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/dracut.sh b/dracut.sh
|
||
|
index 1aa3f8e1f..0c0f85c2d 100755
|
||
|
--- a/dracut.sh
|
||
|
+++ b/dracut.sh
|
||
|
@@ -1033,7 +1033,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
|
||
|
((stdloglvl < 0)) && stdloglvl=0
|
||
|
|
||
|
[[ $drivers_dir_l ]] && drivers_dir=$drivers_dir_l
|
||
|
-drivers_dir="${drivers_dir%%+(/)}"
|
||
|
+drivers_dir="${drivers_dir%"${drivers_dir##*[!/]}"}"
|
||
|
[[ $do_strip_l ]] && do_strip=$do_strip_l
|
||
|
[[ $do_strip ]] || do_strip=yes
|
||
|
[[ $aggressive_strip_l ]] && aggressive_strip=$aggressive_strip_l
|