mkinitrd unification across distributions
 help / color / mirror / Atom feed
* [PATCH] omit drivers fix
@ 2013-08-08  6:05 dyoung-H+wXaHxf7aLQT0dZR+AlfA
       [not found] ` <5203350e.L97Tg2G2L47GaDix%dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: dyoung-H+wXaHxf7aLQT0dZR+AlfA @ 2013-08-08  6:05 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA


Because omit_drivers list use underline always, so when maching with it
the _mod need to be converted as well or sometimes omit-drivers will fail
silently.

Fix this by replace '-' with '_' in instmods function.

Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 dracut-functions.sh |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- dracut.orig/dracut-functions.sh
+++ dracut/dracut-functions.sh
@@ -1617,7 +1617,8 @@ instmods() {
                     return $_ret
                 fi
 
-                if [[ $omit_drivers ]] && [[ "$1" =~ $omit_drivers ]]; then
+                _mod=${_mod/-/_}
+                if [[ $omit_drivers ]] && [[ "$_mod" =~ $omit_drivers ]]; then
                     dinfo "Omitting driver ${_mod##$srcmods}"
                     return 0
                 fi

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

end of thread, other threads:[~2013-08-21  8:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-08  6:05 [PATCH] omit drivers fix dyoung-H+wXaHxf7aLQT0dZR+AlfA
     [not found] ` <5203350e.L97Tg2G2L47GaDix%dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-08-21  7:44   ` Dave Young
     [not found]     ` <52146FF7.8050904-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-08-21  8:21       ` Harald Hoyer
2013-08-21  8:25       ` Dave Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox