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

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