On 05/14/2012 02:10 PM, Cong Wang wrote: >> 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?? Hi, what version of dracut did you use? master branch '-I no/such/file' will not fail... Seems there it is changed to 'dracut -o' in some commit. Also `./dracut.sh -l --add-drivers "no-such-module" -f test.img` return 0 during my test. >> > > 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 majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Thanks Dave -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html