Skip to contentSkip to conversation

omit drivers fix

PATCH In review [email protected] 2 participants 4 messages Aug 8, 2013 – Aug 21, 2013 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 omit drivers fix

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.

---
 dracut-functions.sh |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
dracut-functions.sh +2 -1
@@ -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
author
#2 lore raw
In reply to a message not in the archive
Quoted 25 lines · On 08/08/2013 02:05 PM, [email protected] wrote:

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.

---
 dracut-functions.sh |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
dracut-functions.sh +2 -2
@@ -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
--
Quoted 4 lines

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

Hi, Harald

Could you help to review this patch?

Signature · 2 lines
Thanks
Dave
#4 lore raw
In reply to a message not in the archive
Quoted 33 lines · Dave Young
Quoted 25 lines · On 08/08/2013 02:05 PM, [email protected] wrote:

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.

---
 dracut-functions.sh |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
dracut-functions.sh +2 -2
@@ -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
--
Quoted 4 lines

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

Hi, Harald

Quoted 2 lines

Could you help to review this patch?

Already pushed! Thanks!
http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=beb26a084

author
#5 lore raw
In reply to a message not in the archive
Quoted 33 lines · Dave Young
Quoted 25 lines · On 08/08/2013 02:05 PM, [email protected] wrote:

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.

---
 dracut-functions.sh |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
dracut-functions.sh +2 -2
@@ -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
--
Quoted 4 lines

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

Hi, Harald

Quoted 2 lines

Could you help to review this patch?

Just find it has been merged, cancel the question..

Signature · 2 lines
Thanks
Dave