dracut-functions: fixed doubled $initdir prefix inst_library()
PATCH 1/1 dracut-functions: fixed doubled $initdir prefix inst_library()
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(-)
dracut-functions +4 -2
@@ -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"
Signature · 1 line
1.7.4.1
Hello,
2011/2/25 Amadeusz Żołnowski <[email protected]>:
Quoted 16 lines
Commit
172d85b9c949b321771d63dbd5f06ecf19cf94f0caused following error:./dracut-functions: line 307: cd:
/tmp/initramfs.mP7cPY/tmp/initramfs.mP7cPY/lib64: No such file or directoryPatch removes beginning $initdir for symlink case.
---
dracut-functions | 6 ++++--1 files changed, 4 insertions(+), 2 deletions(-)dracut-functions +0
-0@@ -302,8 +302,10 @@ inst_library() { lib=${src##*/}
inst_simple"$reallib" "$reallib"
Quoted 8 lines
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")
I'm sorry about the trouble caused by my patch I didn't considered the case /lib64 -> lib. On debian I was getting /lib64 -> /lib
Regards,
JonAn.