dracut-functions: fixed doubled $initdir prefix inst_library()

Commit 172d85b9c9 caused following error:

./dracut-functions: line 307: cd: /tmp/initramfs.mP7cPY/tmp/initramfs.mP7cPY/lib64: No such file or directory

Patch removes beginning $initdir for symlink case.
master
Amadeusz Żołnowski 2011-02-25 09:59:34 +01:00 committed by Harald Hoyer
parent 9d49507f80
commit f90fd5b34b
1 changed files with 4 additions and 2 deletions

View File

@ -302,8 +302,10 @@ inst_library() {
lib=${src##*/}
inst_simple "$reallib" "$reallib"
inst_dir "${dest%/*}"
[[ -L ${initdir}${dest%/*} ]] && \
dest=$(readlink -f ${initdir}${dest%/*})/
if [[ -L ${initdir}${dest%/*} ]]; then
dest=$(readlink -f ${initdir}${dest%/*})/
dest=${dest#${initdir}}
fi
(cd "${initdir}${dest%/*}" && ln -s "$reallib" "$lib")
else
inst_simple "$src" "$dest"