]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions.sh:inst_rules() do not install rules in CWD
authorHarald Hoyer <harald@redhat.com>
Fri, 4 Oct 2013 11:32:15 +0000 (13:32 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 4 Oct 2013 11:36:25 +0000 (13:36 +0200)
dracut-functions.sh

index cf33af56af365dbce7bbd76c024d55f0de125dde..45e0911872870fce76d6acb7472a69176f99d6eb 100755 (executable)
@@ -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"