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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit 172d85b9c949b321771d63dbd5f06ecf19cf94f0 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.
---
 dracut-functions |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dracut-functions b/dracut-functions
index 1cb43e7..cc16760 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -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"
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux