Blame 0025-dracut-functions-resolve-relative-path-and-recursive.patch

Harald Hoyer 428fde
From 7b07f4e83fe514dbbe66869337d3d0cf8610240b Mon Sep 17 00:00:00 2001
Harald Hoyer 428fde
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 428fde
Date: Mon, 25 Jul 2011 10:55:19 +0200
Harald Hoyer 428fde
Subject: [PATCH] dracut-functions: resolve relative path and recursively
Harald Hoyer 428fde
 install destination
Harald Hoyer 428fde
Harald Hoyer 428fde
---
Harald Hoyer 428fde
 dracut-functions |    6 ++----
Harald Hoyer 428fde
 1 files changed, 2 insertions(+), 4 deletions(-)
Harald Hoyer 428fde
Harald Hoyer 428fde
diff --git a/dracut-functions b/dracut-functions
Harald Hoyer 428fde
index 2a45419..a261ddd 100755
Harald Hoyer 428fde
--- a/dracut-functions
Harald Hoyer 428fde
+++ b/dracut-functions
Harald Hoyer 428fde
@@ -277,12 +277,10 @@ inst_dir() {
Harald Hoyer 428fde
         if [[ -L $_file ]]; then
Harald Hoyer 428fde
             # create link as the original
Harald Hoyer 428fde
             local target=$(readlink "$_file")
Harald Hoyer 428fde
+            # resolve relative path and recursively install destination
Harald Hoyer 428fde
+            [[ $target == ${target#/} ]] && target="$(dirname "$_file")/$target"
Harald Hoyer 428fde
             inst_dir "$target"
Harald Hoyer 428fde
             inst_symlink "$_file"
Harald Hoyer 428fde
-            #ln -sfn "$target" "${initdir}$_file" || return 1
Harald Hoyer 428fde
-            # resolve relative path and recursively install destination
Harald Hoyer 428fde
-            #[[ $target == ${target#/} ]] && target="$(dirname "$_file")/$target"
Harald Hoyer 428fde
-            #inst_dir "$target"
Harald Hoyer 428fde
         else
Harald Hoyer 428fde
             [[ -h ${initdir}$_file ]] && _file=$(readlink "${initdir}$_file")
Harald Hoyer 428fde
             # create directory