Skip to content

Commit de0c087

Browse files
committed
fix(dracut): prevent symbolic links containing //
Results in `usr/lib64 -> ..//usr/lib` for Arch Linux otherwise.
1 parent 22d6863 commit de0c087

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: dracut.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1838,13 +1838,15 @@ fi
18381838
18391839
if [[ $prefix ]]; then
18401840
for d in bin etc lib sbin tmp usr var $libdirs; do
1841+
d=${d#/}
18411842
[[ $d == */* ]] && continue
18421843
ln -sfn "${prefix#/}/${d#/}" "$initdir/$d"
18431844
done
18441845
fi
18451846
18461847
if [[ $kernel_only != yes ]]; then
18471848
for d in usr usr/bin usr/sbin bin etc lib sbin tmp var var/tmp $libdirs; do
1849+
d=${d#/}
18481850
[[ -e "${initdir}${prefix}/$d" ]] && continue
18491851
if [ -L "/$d" ]; then
18501852
inst_symlink "/$d" "${prefix}/$d"

0 commit comments

Comments
 (0)