Skip to content

Commit 1ddcb13

Browse files
pvalenaLaszloGombos
authored andcommitted
fix(dracut.sh): kmoddir does not handle trailing /
Fixes #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().
1 parent 6d554d9 commit 1ddcb13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dracut.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
10331033
((stdloglvl < 0)) && stdloglvl=0
10341034

10351035
[[ $drivers_dir_l ]] && drivers_dir=$drivers_dir_l
1036-
drivers_dir="${drivers_dir%%+(/)}"
1036+
drivers_dir="${drivers_dir%"${drivers_dir##*[!/]}"}"
10371037
[[ $do_strip_l ]] && do_strip=$do_strip_l
10381038
[[ $do_strip ]] || do_strip=yes
10391039
[[ $aggressive_strip_l ]] && aggressive_strip=$aggressive_strip_l

0 commit comments

Comments
 (0)