<div dir="ltr"><div><div><div>Hi,<br><br></div>Let me know if any more changes have to be made to make this patch look better.<br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 4, 2014 at 7:27 PM, Sujith H <span dir="ltr">&lt;<a href="mailto:sujith.h@gmail.com" target="_blank">sujith.h@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Sujith H &lt;<a href="mailto:Sujith_Haridasan@mentor.com">Sujith_Haridasan@mentor.com</a>&gt;<br>


<br>
If hostname is not added to /etc/hosts file then rpcinfo<br>
command fails when hostname is passed as argument. This was<br>
observed when rpcinfo command was tested on freescale target.<br>
Below was the output observed without this change.<br>
<br>
root@mx6q:~# rpcinfo -s mx6q<br>
rpcinfo: can&#39;t contact rpcbind: RPC: (unknown error code)<br>
<br>
Below is the output after this change:<br>
root@mx6q:~# rpcinfo -s mx6q<br>
   program version(s) netid(s)                         service     owner<br>
    100000  2,3,4     local,udp,tcp,udp6,tcp6          portmapper  superuser<br>
root@mx6q:~#<br>
<br>
Signed-off-by: Sujith H &lt;<a href="mailto:Sujith_Haridasan@mentor.com">Sujith_Haridasan@mentor.com</a>&gt;<br>
---<br>
 meta/classes/image.bbclass | 8 ++++++++<br>
 1 file changed, 8 insertions(+)<br>
<br>
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass<br>
index 82605f2..7a5a5c1 100644<br>
--- a/meta/classes/image.bbclass<br>
+++ b/meta/classes/image.bbclass<br>
@@ -341,6 +341,14 @@ ssh_disable_dns_lookup () {<br>
        fi<br>
 }<br>
<br>
+ROOTFS_POSTPROCESS_COMMAND += &quot;add_machine_name_loop_back;&quot;<br>
+<br>
+add_machine_name_loop_back() {<br>
+    if [ -n ${MACHINE} ]; then<br>
+         echo 127.0.1.1 &quot;       &quot;${MACHINE} &gt;&gt; ${IMAGE_ROOTFS}${sysconfdir}/hosts<br>
+    fi<br>
+}<br>
+<br>
 # Enable postinst logging if debug-tweaks is enabled<br>
 postinst_enable_logging () {<br>
        mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/default<br>
<span class=""><font color="#888888">--<br>
1.8.4<br>
<br>
</font></span></blockquote></div><br>Thanks,<br>Sujith H<br clear="all"><br>-- <br>സുജിത് ഹരിദാസന്<br>Bangalore<br>&lt;Project&gt;Contributor to KDE project<br><a href="http://fci.wikia.com/wiki/Anti-DRM-Campaign" target="_blank">http://fci.wikia.com/wiki/Anti-DRM-Campaign</a><br>

&lt;Blog&gt; <a href="http://sujithh.info" target="_blank">http://sujithh.info</a><br>
</div></div>