On Nov 4, 2011 4:35 PM, "Phil Blundell" <[email protected]<mailto:[email protected]>> 
wrote:
>
> On Fri, 2011-11-04 at 16:25 -0500, Matthew McClintock wrote:
> > v2: handle case where SERIAL_CONSOLES is not defined
> >
> >  
> > .../sysvinit/sysvinit-inittab_2.88dsf.bb<http://sysvinit-inittab_2.88dsf.bb>
> >            |   12 ++++++++++++
> >  1 files changed, 12 insertions(+), 0 deletions(-)
> >
> > diff --git 
> > a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb<http://sysvinit-inittab_2.88dsf.bb>
> >  
> > b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb<http://sysvinit-inittab_2.88dsf.bb>
> > index ba60c74..adab262 100644
> > --- 
> > a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb<http://sysvinit-inittab_2.88dsf.bb>
> > +++ 
> > b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb<http://sysvinit-inittab_2.88dsf.bb>
> > @@ -25,6 +25,18 @@ do_install() {
> >      if [ ! -z "${SERIAL_CONSOLE}" ]; then
> >          echo "S:2345:respawn:${base_sbindir}/getty ${SERIAL_CONSOLE}" >> 
> > ${D}${sysconfdir}/inittab
> >      fi
> > +
> > +    idx=0
> > +    tmp="${SERIAL_CONSOLES}"
> > +    if [ "x" != "x$tmp" ]; then
> > +     for i in $tmp
> > +     do
> > +         j=`echo ${i} | sed s/\;/\ /g`
> > +         echo "${idx}:2345:respawn:${base_sbindir}/getty ${j}" >> 
> > ${D}${sysconfdir}/inittab
> > +         idx=`expr $idx + 1`
> > +     done
> > +    fi
> > +
>
> Did you test that this actually solves the problem?  It looks to me as
> though it will still do the wrong thing if the variable is not defined
> at all (as opposed to being defined to the empty string).  The added
> "if" statement doesn't actually achieve much since, if $tmp is the empty
> string, the for-loop wouldn't have executed anyway and there is no need
> for an extra guard.
>
> Also, for what it's worth, the "x$tmp" idiom is unnecessary if you're
> going to quote the strings.
>
> p.
>
>

Thanks for the feedback. Ill look at this again when I'm fresh.

-M

>
> _______________________________________________
> Openembedded-core mailing list
> [email protected]<mailto:[email protected]>
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to