38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 76f5fa549c483a7a38e4757578480096b94615ac Mon Sep 17 00:00:00 2001
|
|
From: Harald Hoyer <harald@redhat.com>
|
|
Date: Thu, 22 Sep 2011 15:43:34 +0200
|
|
Subject: [PATCH] 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.
|
|
---
|
|
dracut-functions | 14 ++++++++------
|
|
1 files changed, 8 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/dracut-functions b/dracut-functions
|
|
index b11e37c..18a2e89 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"
|