On Mon, 14 May 2012 at 06:01 GMT, Cong Wang <[email protected]> wrote:
> On Thu, 10 May 2012 at 08:19 GMT, Dave Young <[email protected]> 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??
>
A better version:
---->
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 8256e02..148dd19 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -1168,11 +1168,17 @@ instmods() {
local _ret=0 _mod _mpargs
if (($# == 0)); then # filenames from stdin
while read _mod; do
- inst1mod "${_mod%.ko*}"
+ inst1mod "${_mod%.ko*}" || {
+ dfatal "Failed to install ${_mod%.ko*}"
+ return 1
+ }
done
fi
while (($# > 0)); do # filenames as arguments
- inst1mod ${1%.ko*}
+ inst1mod ${1%.ko*} || {
+ dfatal "Failed to install ${1%.ko*}"
+ return 1
+ }
shift
done
return $_ret
--
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