[PATCH 1/2] dracut-functions.sh: support for alternative udev dirs - udevaltdirs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It is required for Gentoo which moves udev from / to /usr and supports
both /lib/udev and /usr/lib/udev for compatibility with other packages.

Credits go to Alexander Tsoy <alexander@xxxxxxx>.
---
 dracut-functions.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dracut-functions.sh b/dracut-functions.sh
index 5481368..5b6394e 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -901,6 +901,15 @@ inst_rules() {
     inst_dir "$_target"
     for _rule in "$@"; do
         if [ "${_rule#/}" = "$_rule" ]; then
+            for r in ${udevaltdirs}; do
+                [[ "$r" = "${udevdir}" ]] && continue
+                if [[ -f $r/rules.d/$_rule ]]; then
+                    _found="$r/rules.d/$_rule"
+                    inst_rule_programs "$_found"
+                    inst_rule_group_owner "$_found"
+                    inst_simple "$_found" "${udevdir}/rules.d/${_found##*/}"
+                fi
+            done
             for r in ${udevdir}/rules.d /etc/udev/rules.d; do
                 if [[ -f $r/$_rule ]]; then
                     _found="$r/$_rule"
-- 
1.8.1

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux