dracut-functions: install udev rules
Install the udev rules to /lib, if the original rule is found there.master
parent
94f4923039
commit
c97e1a76f3
|
@ -403,9 +403,19 @@ inst_rules() {
|
|||
inst_dir "/lib/udev/rules.d"
|
||||
inst_dir "$target"
|
||||
for rule in "$@"; do
|
||||
found=$(find_rule "$rule") && \
|
||||
inst_simple "$found" "$target/${found##*/}" \
|
||||
|| dinfo "Skipping udev rule: $rule"
|
||||
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
|
||||
for r in '' ./ $dracutbasedir/rules.d/; do
|
||||
if [[ -f ${r}$rule ]]; then
|
||||
found="${r}$rule"
|
||||
inst_simple "$found" "$target/${found##*/}"
|
||||
fi
|
||||
done
|
||||
[[ $found ]] || dinfo "Skipping udev rule: $rule"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue