Blob Blame History Raw
From e51260e4fe7aea29d850456b8ea0d3b17da971f5 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 10 Aug 2011 17:38:02 +0200
Subject: [PATCH] dracut-functions: create relative symlinks for libraries

---
 dracut-functions |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dracut-functions b/dracut-functions
index 61e10e8..5779a18 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -359,10 +359,9 @@ inst_library() {
             inst "${_src%/*}/.${_src##*/}.hmac" "${_dest%/*}/.${_dest##*/}.hmac"
         fi
         _reallib=$(readlink -f "$_src")
-        _lib=${_src##*/}
         inst_simple "$_reallib" "$_reallib"
         inst_dir "${_dest%/*}"
-        (cd "${initdir}${_dest%/*}" && ln -sfn "$_reallib" "$_lib")
+        ln -sfn $(convert_abs_rel "${_dest}" "${_reallib}") "${initdir}${_dest}"
     else
         inst_simple "$_src" "$_dest"
     fi