dracut-functions: fixed installing libraries which links to another directory

$ ldd `which bash` | grep ld
/lib64/ld-linux-x86-64.so.2 (0x00007fa1cc3ff000)

$ readlink -f /lib64/ld-linux-x86-64.so.2
/lib/ld-2.12.1.so

So inst_library /lib64/ld-linux-x86-64.so.2 was doing :

(cd "/tmp/initramfs.4uaeD9/lib64" && ln -s "/lib/ld-2.12.1.so"
 "ld-linux-x86-64.so.2")

But, /tmp/initramfs.4uaeD9/lib64 -> /lib... :-S
master
Jon Ander Hernandez 2011-02-17 10:35:27 +01:00 committed by Harald Hoyer
parent 81c6e7fb69
commit 172d85b9c9
1 changed files with 2 additions and 0 deletions

View File

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