Blob Blame History Raw
From 400921d48bf71add0387a6f3ebdec83f32843f1d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 4 Oct 2013 13:32:15 +0200
Subject: [PATCH] dracut-functions.sh:inst_rules() do not install rules in CWD

---
 dracut-functions.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dracut-functions.sh b/dracut-functions.sh
index cf33af5..45e0911 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -882,7 +882,10 @@ inst_rules() {
                 fi
             done
         fi
-        for r in '' ./ $dracutbasedir/rules.d/; do
+        for r in '' $dracutbasedir/rules.d/; do
+            # skip rules without an absolute path
+            [[ "${r}$_rule" != /* ]] && continue
+
             if [[ -f ${r}$_rule ]]; then
                 _found="${r}$_rule"
                 inst_rule_programs "$_found"