<div dir="ltr"><div><div><div><div><div><div>Hi Hans,<br></div>I&#39;m far from being a scripting-expert, so I just did what I could in order to get rid of the warning and stop the service.<br></div>Sending this patch was just a way to raise some attention to the bug and get some discussion going :-)<br>
</div>If there are other ways one should proceed instead of sending &quot;broken&quot; patches to the mailing list I will do so in the future.<br></div></div>Regards<br></div>Jacob<br></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Sun, Oct 27, 2013 at 8:18 AM, Hans Beckerus <span dir="ltr">&lt;<a href="mailto:hans.beckerus@gmail.com" target="_blank">hans.beckerus@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 2013-10-27 12:36, Jacob Kroon wrote:<br>
&gt; When running the postinst script I get a shell warning:<br>
&gt;<br>
&gt; sh: argument expected<br>
&gt;<br>
&gt; and the service is never stopped. This patch fixes the warning<br>
&gt; message and stops the service.<br>
</div>This patch does not look right to me?<br>
If length of $(D) is zero the condition will *always* be true. Instead of actually testing the existence of &quot;${INIT_D_DIR}/${INITSCRIPT_NAME}&quot; it is now simply converted to a string. What did I miss ;)<br>
<br>
Thanks.<br>
Hans<br>
<div class="im"><br>
&gt; Signed-off-by: Jacob Kroon &lt;<a href="mailto:jacob.kroon@gmail.com">jacob.kroon@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt;  meta/classes/update-rc.d.bbclass | 2 +-<br>
&gt;  1 file changed, 1 insertion(+), 1 deletion(-)<br>
&gt;<br>
&gt; diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass<br>
&gt; index e14659d..835b717 100644<br>
&gt; --- a/meta/classes/update-rc.d.bbclass<br>
&gt; +++ b/meta/classes/update-rc.d.bbclass<br>
&gt; @@ -16,7 +16,7 @@ updatercd_postinst() {<br>
&gt;  # test if there is a previous init script there, ie, we are updating the package<br>
&gt;  # if so, we stop the service and remove it before we install from the new package<br>
&gt;  if type update-rc.d &gt;/dev/null 2&gt;/dev/null; then<br>
&gt; -     if [ -z &quot;$D&quot; -a `test -f &quot;${INIT_D_DIR}/${INITSCRIPT_NAME}&quot;` ]; then<br>
&gt; +     if [ -z &quot;$D&quot; -a &quot;test -f ${INIT_D_DIR}/${INITSCRIPT_NAME}&quot; ]; then<br>
&gt;               ${INIT_D_DIR}/${INITSCRIPT_NAME} stop<br>
&gt;       fi<br>
&gt;       if [ -n &quot;$D&quot; ]; then<br>
<br>
</div>_______________________________________________<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.openembedded.org/mailman/listinfo/openembedded-core" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>  -- Jacob
</div>