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