[OE-core] [PATCH v2] Introduce new SERIAL_CONSOLES to add multiple consoles for your MACHINE
McClintock Matthew-B29882
B29882 at freescale.com
Fri Nov 4 22:12:23 UTC 2011
On Nov 4, 2011 4:35 PM, "Phil Blundell" <philb at gnu.org<mailto:philb at gnu.org>> 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
> Openembedded-core at lists.openembedded.org<mailto:Openembedded-core at lists.openembedded.org>
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20111104/9e399935/attachment-0002.html>
More information about the Openembedded-core
mailing list