Blame SOURCES/0016-dracut-functions.sh-inst_rules-do-not-install-rules-.patch

712866
From 31b89c8c2bfb5a0336268cc66bd663429122feb3 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Fri, 4 Oct 2013 13:32:15 +0200
712866
Subject: [PATCH] dracut-functions.sh:inst_rules() do not install rules in CWD
712866
712866
---
712866
 dracut-functions.sh | 5 ++++-
712866
 1 file changed, 4 insertions(+), 1 deletion(-)
712866
712866
diff --git a/dracut-functions.sh b/dracut-functions.sh
5c6c2a
index cf33af56..45e09118 100755
712866
--- a/dracut-functions.sh
712866
+++ b/dracut-functions.sh
712866
@@ -882,7 +882,10 @@ inst_rules() {
712866
                 fi
712866
             done
712866
         fi
712866
-        for r in '' ./ $dracutbasedir/rules.d/; do
712866
+        for r in '' $dracutbasedir/rules.d/; do
712866
+            # skip rules without an absolute path
712866
+            [[ "${r}$_rule" != /* ]] && continue
712866
+
712866
             if [[ -f ${r}$_rule ]]; then
712866
                 _found="${r}$_rule"
712866
                 inst_rule_programs "$_found"