Harald Hoyer d1bf89
From cacaa90c63512a068720d61d671ce3ddd1fbd81d Mon Sep 17 00:00:00 2001
Harald Hoyer d1bf89
From: Thomas Lange <lange@informatik.uni-koeln.de>
Harald Hoyer d1bf89
Date: Thu, 14 Jun 2012 17:42:34 +0200
Harald Hoyer d1bf89
Subject: [PATCH] Debian multiarch support
Harald Hoyer d1bf89
Harald Hoyer d1bf89
Hi Jon,
Harald Hoyer d1bf89
Harald Hoyer d1bf89
here's the diff which works for me.  The quotation marks around $@ do
Harald Hoyer d1bf89
not work for me. Instead of "$@" I must to use $_dir/$@ (or
Harald Hoyer d1bf89
"$_dir"/$@) but no quotation marks around $@. Could you please review
Harald Hoyer d1bf89
my patch.
Harald Hoyer d1bf89
---
Harald Hoyer d1bf89
 dracut-functions.sh |    8 ++++----
Harald Hoyer d1bf89
 1 file changed, 4 insertions(+), 4 deletions(-)
Harald Hoyer d1bf89
Harald Hoyer d1bf89
diff --git a/dracut-functions.sh b/dracut-functions.sh
Harald Hoyer d1bf89
index 6a72fce..38367b4 100755
Harald Hoyer d1bf89
--- a/dracut-functions.sh
Harald Hoyer d1bf89
+++ b/dracut-functions.sh
Harald Hoyer d1bf89
@@ -699,13 +699,13 @@ dracut_install() {
Harald Hoyer d1bf89
 
Harald Hoyer d1bf89
 # inst_libdir_file [-n <pattern>] <file> [<file>...]
Harald Hoyer d1bf89
 # Install a <file> located on a lib directory to the initramfs image
Harald Hoyer d1bf89
-# -n <pattern> install non-matching files
Harald Hoyer d1bf89
+# -n <pattern> install matching files
Harald Hoyer d1bf89
 inst_libdir_file() {
Harald Hoyer d1bf89
     if [[ "$1" == "-n" ]]; then
Harald Hoyer d1bf89
-        local _pattern=$1
Harald Hoyer d1bf89
+        local _pattern=$2
Harald Hoyer d1bf89
         shift 2
Harald Hoyer d1bf89
         for _dir in $libdirs; do
Harald Hoyer d1bf89
-            for _i in "$@"; do
Harald Hoyer d1bf89
+            for _i in $_dir/$@; do
Harald Hoyer d1bf89
                 for _f in "$_dir"/$_i; do
Harald Hoyer d1bf89
                     [[ "$_i" =~ $_pattern ]] || continue
Harald Hoyer d1bf89
                     [[ -e "$_i" ]] && dracut_install "$_i"
Harald Hoyer d1bf89
@@ -714,7 +714,7 @@ inst_libdir_file() {
Harald Hoyer d1bf89
         done
Harald Hoyer d1bf89
     else
Harald Hoyer d1bf89
         for _dir in $libdirs; do
Harald Hoyer d1bf89
-            for _i in "$@"; do
Harald Hoyer d1bf89
+            for _i in $_dir/$@; do
Harald Hoyer d1bf89
                 for _f in "$_dir"/$_i; do
Harald Hoyer d1bf89
                     [[ -e "$_f" ]] && dracut_install "$_f"
Harald Hoyer d1bf89
                 done