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