Blob Blame History Raw
From cacaa90c63512a068720d61d671ce3ddd1fbd81d Mon Sep 17 00:00:00 2001
From: Thomas Lange <lange@informatik.uni-koeln.de>
Date: Thu, 14 Jun 2012 17:42:34 +0200
Subject: [PATCH] Debian multiarch support

Hi Jon,

here's the diff which works for me.  The quotation marks around $@ do
not work for me. Instead of "$@" I must to use $_dir/$@ (or
"$_dir"/$@) but no quotation marks around $@. Could you please review
my patch.
---
 dracut-functions.sh |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dracut-functions.sh b/dracut-functions.sh
index 6a72fce..38367b4 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -699,13 +699,13 @@ dracut_install() {
 
 # inst_libdir_file [-n <pattern>] <file> [<file>...]
 # Install a <file> located on a lib directory to the initramfs image
-# -n <pattern> install non-matching files
+# -n <pattern> install matching files
 inst_libdir_file() {
     if [[ "$1" == "-n" ]]; then
-        local _pattern=$1
+        local _pattern=$2
         shift 2
         for _dir in $libdirs; do
-            for _i in "$@"; do
+            for _i in $_dir/$@; do
                 for _f in "$_dir"/$_i; do
                     [[ "$_i" =~ $_pattern ]] || continue
                     [[ -e "$_i" ]] && dracut_install "$_i"
@@ -714,7 +714,7 @@ inst_libdir_file() {
         done
     else
         for _dir in $libdirs; do
-            for _i in "$@"; do
+            for _i in $_dir/$@; do
                 for _f in "$_dir"/$_i; do
                     [[ -e "$_f" ]] && dracut_install "$_f"
                 done