From 31b89c8c2bfb5a0336268cc66bd663429122feb3 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 cf33af56..45e09118 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"