dracut-functions: cosmetic changes to inst_rules

master
Amadeusz Żołnowski 2010-07-05 11:25:21 +02:00 committed by Harald Hoyer
parent 5f70a1bd06
commit fd2312e03d
1 changed files with 5 additions and 4 deletions

View File

@ -331,13 +331,14 @@ find_rule() {
# udev rules always get installed in the same place, so
# create a function to install them to make life simpler.
inst_rules() {
local target=/etc/udev/rules.d
local target=/etc/udev/rules.d rule found

inst_dir "/lib/udev/rules.d"
inst_dir "$target"
for rule in "$@"; do
rule1=$(find_rule "$rule") && \
inst_simple "$rule1" "$target/${rule1##*/}" \
|| dinfo "Skipping udev rule: $rule"
found=$(find_rule "$rule") && \
inst_simple "$found" "$target/${found##*/}" \
|| dinfo "Skipping udev rule: $rule"
done
}