All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: dracut options for installing files and drivers
Date: Mon, 14 May 2012 06:01:28 +0000 (UTC)	[thread overview]
Message-ID: <joq73o$u50$1@dough.gmane.org> (raw)
In-Reply-To: 4FAB7A26.4060409@redhat.com

On Thu, 10 May 2012 at 08:19 GMT, Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> On 05/10/2012 10:10 AM, Dave Young wrote:
>
>> On 05/09/2012 08:40 PM, Harald Hoyer wrote:
>> 
>>> Am 09.05.2012 09:35, schrieb Dave Young:
>>>> Hi, harald
>>>>
>>>> Dracut options '-I' and '-a' both mean optionally install file/ko
>>>
>>> this is wrong
>>>
>>> $ man dracut
>>>
>>> "-a" means
>>>
>>>        -a, --add <list of dracut modules>
>> 
>> 
>> modules install happens in modules.d/90kernel-modules/module-setup.sh
>> but module-setup.sh does not check the return value of instmods, so it
>> will not fail and exit if no such modules.
>
>
> Oops, I actually means --add-drivers instead of -a
>

Yeah...

% sudo dracut --add-drivers "no-such-module" -I "/no/such/file" -f test.img
E: ssh interactive mode need option --ctty!
F: Failed to install /no/such/file
% echo $?
1

Maybe the following untested patch could fix this??

---
diff --git a/modules.d/90kernel-modules/module-setup.sh
b/modules.d/90kernel-modules/module-setup.sh
index 26f4784..838088a 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -58,8 +58,18 @@ installkernel() {
         hostonly='' instmods $drivers
      fi
	       
       -    [[ $add_drivers ]] && hostonly='' instmods $add_drivers
       -    [[ $filesystems ]] && hostonly='' instmods $filesystems
       +    if [[ $add_drivers ]]; then
       +        hostonly='' instmods $add_drivers || {
       +            dfatal "Failed to install $add_drivers"
       +            return 1
       +       }
       +    fi
       +    if [[ $filesystems ]]; then
       +        hostonly='' instmods $filesystems || {
       +            dfatal "Failed to install $filesystems"
       +            return 1
       +       }
       +    fi
        
	     # force install of scsi_wait_scan
          hostonly='' instmods scsi_wait_scan
			  

  reply	other threads:[~2012-05-14  6:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09  7:35 dracut options for installing files and drivers Dave Young
     [not found] ` <4FAA1E44.2090006-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-05-09 12:40   ` Harald Hoyer
     [not found]     ` <4FAA65B7.9040209-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-05-10  2:10       ` Dave Young
     [not found]         ` <4FAB2379.2050504-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-05-10  8:19           ` Dave Young
2012-05-14  6:01             ` Cong Wang [this message]
2012-05-14  6:10               ` Cong Wang
2012-05-14  9:39                 ` Dave Young
2012-05-15  3:00                   ` Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='joq73o$u50$1@dough.gmane.org' \
    --to=xiyou.wangcong-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.