All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dracut-functions.sh: support for alternative udev dirs - udevaltdirs
@ 2013-01-23 18:37 Amadeusz Żołnowski
       [not found] ` <1358966239-19496-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Amadeusz Żołnowski @ 2013-01-23 18:37 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Amadeusz Żołnowski

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-EP/B3+myoZc@public.gmane.org>.
---
 dracut-functions.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dracut-functions.sh b/dracut-functions.sh
index e23db76..812ea2b 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -941,6 +941,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.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH 1/2] dracut-functions.sh: support for alternative udev dirs - udevaltdirs
@ 2013-01-12 19:48 Amadeusz Żołnowski
       [not found] ` <1358020128-20693-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Amadeusz Żołnowski @ 2013-01-12 19:48 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Amadeusz Żołnowski

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-EP/B3+myoZc@public.gmane.org>.
---
 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH 1/2] dracut-functions.sh: support for alternative udev dirs - udevaltdirs
@ 2012-12-16 19:05 Amadeusz Żołnowski
       [not found] ` <1355684720-25274-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Amadeusz Żołnowski @ 2012-12-16 19:05 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Amadeusz Żołnowski

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.
---
 dracut-functions.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dracut-functions.sh b/dracut-functions.sh
index f1c797c..4a9ebbb 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -896,12 +896,18 @@ inst_rule_group_owner() {
 # create a function to install them to make life simpler.
 inst_rules() {
     local _target=/etc/udev/rules.d _rule _found
+    local _rules_dirs=( "$udevdir/rules.d" "/etc/udev/rules.d" )
+    local _d
+
+    for _d in $udevaltdirs; do
+        _rules_dirs+=( "$_d/rules.d" )
+    done
 
     inst_dir "${udevdir}/rules.d"
     inst_dir "$_target"
     for _rule in "$@"; do
         if [ "${rule#/}" = "$rule" ]; then
-            for r in ${udevdir}/rules.d /etc/udev/rules.d; do
+            for r in "${_rules_dirs[@]}"; do
                 if [[ -f $r/$_rule ]]; then
                     _found="$r/$_rule"
                     inst_rule_programs "$_found"
-- 
1.8.0.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-27  9:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23 18:37 [PATCH 1/2] dracut-functions.sh: support for alternative udev dirs - udevaltdirs Amadeusz Żołnowski
     [not found] ` <1358966239-19496-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
2013-01-23 18:37   ` [PATCH 2/2] gentoo.conf: let udevdir= be handled by pkg-config and use udevaltdirs Amadeusz Żołnowski
     [not found]     ` <1358966239-19496-2-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
2013-01-23 19:45       ` Colin Guthrie
2013-01-27  9:38         ` Amadeusz Żołnowski
  -- strict thread matches above, loose matches on Subject: below --
2013-01-12 19:48 [PATCH 1/2] dracut-functions.sh: support for alternative udev dirs - udevaltdirs Amadeusz Żołnowski
     [not found] ` <1358020128-20693-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
2013-01-12 19:48   ` [PATCH 2/2] gentoo.conf: let udevdir= be handled by pkg-config and use udevaltdirs Amadeusz Żołnowski
2012-12-16 19:05 [PATCH 1/2] dracut-functions.sh: support for alternative udev dirs - udevaltdirs Amadeusz Żołnowski
     [not found] ` <1355684720-25274-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
2012-12-16 19:05   ` [PATCH 2/2] gentoo.conf: let udevdir= be handled by pkg-config and use udevaltdirs Amadeusz Żołnowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.