From: Harald Hoyer Date: Thu, 22 Sep 2011 13:43:34 +0000 (+0200) Subject: dracut-functions: inst_rules() do not check std dirs for abs path X-Git-Tag: 014~87 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=76f5fa549c483a7a38e4757578480096b94615ac;p=thirdparty%2Fdracut.git dracut-functions: inst_rules() do not check std dirs for abs path if an absolute path is given, we should not check the standard udev rule directories. --- diff --git a/dracut-functions b/dracut-functions index b11e37c0e..18a2e8929 100755 --- a/dracut-functions +++ b/dracut-functions @@ -474,12 +474,14 @@ inst_rules() { inst_dir "/lib/udev/rules.d" inst_dir "$_target" for _rule in "$@"; do - for r in /lib/udev/rules.d /etc/udev/rules.d; do - if [[ -f $r/$_rule ]]; then - _found="$r/$_rule" - inst_simple "$_found" - fi - done + if [ "${rule#/}" = $rule ]; then + for r in /lib/udev/rules.d /etc/udev/rules.d; do + if [[ -f $r/$_rule ]]; then + _found="$r/$_rule" + inst_simple "$_found" + fi + done + fi for r in '' ./ $dracutbasedir/rules.d/; do if [[ -f ${r}$_rule ]]; then _found="${r}$_rule"