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

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