Some versions of udevd do not look for rules in /lib/udev/rules.d

For those versions, install rules to /etc/udev/rules.d instead.
master
Victor Lowther 2009-03-07 08:32:02 -06:00
parent 71388098b6
commit 496d08bb19
1 changed files with 3 additions and 1 deletions

View File

@ -140,9 +140,11 @@ 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="/lib/udev/rules.d"
[[ -d $target ]] || target="/etc/udev/rules.d"
for rule in "$@"; do
rule=$(find_rule $rule) && \
inst_simple "$rule" "/lib/udev/rules.d/${rule##*/}"
inst_simple "$rule" "$target/${rule##*/}"
done
}