Patchwork [1/2] netbase: Adding loop back for machine name in hosts file

login
register
mail settings
Submitter Sujith H
Date Aug. 4, 2014, 1:54 p.m.
Message ID <1407160489-30708-1-git-send-email-sujith.h@gmail.com>
Download mbox | patch
Permalink /patch/77195/
State New
Headers show

Comments

Sujith H - Aug. 4, 2014, 1:54 p.m.
From: Sujith H <Sujith_Haridasan@mentor.com>

If hostname is not added to /etc/hosts file then rpcinfo
command fails when hostname is passed as argument. This was
observed when rpcinfo command was tested on freescale target.
Below was the output observed without this change.

root@mx6q:~# rpcinfo -s mx6q
rpcinfo: can't contact rpcbind: RPC: (unknown error code)

Below is the output after this change:
root@mx6q:~# rpcinfo -s mx6q
   program version(s) netid(s)                         service     owner
    100000  2,3,4     local,udp,tcp,udp6,tcp6          portmapper  superuser
root@mx6q:~#

Signed-off-by: Sujith H <Sujith_Haridasan@mentor.com>
---
 meta/recipes-core/netbase/netbase_5.2.bb | 1 +
 1 file changed, 1 insertion(+)
Sujith H - Aug. 4, 2014, 2 p.m.
Kindly ignore the above patch. It was sent by mistake :( Sorry for trouble.


On Mon, Aug 4, 2014 at 7:24 PM, Sujith H <sujith.h@gmail.com> wrote:

> From: Sujith H <Sujith_Haridasan@mentor.com>
>
> If hostname is not added to /etc/hosts file then rpcinfo
> command fails when hostname is passed as argument. This was
> observed when rpcinfo command was tested on freescale target.
> Below was the output observed without this change.
>
> root@mx6q:~# rpcinfo -s mx6q
> rpcinfo: can't contact rpcbind: RPC: (unknown error code)
>
> Below is the output after this change:
> root@mx6q:~# rpcinfo -s mx6q
>    program version(s) netid(s)                         service     owner
>     100000  2,3,4     local,udp,tcp,udp6,tcp6          portmapper
>  superuser
> root@mx6q:~#
>
> Signed-off-by: Sujith H <Sujith_Haridasan@mentor.com>
> ---
>  meta/recipes-core/netbase/netbase_5.2.bb | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-core/netbase/netbase_5.2.bb
> b/meta/recipes-core/netbase/netbase_5.2.bb
> index ab7ae65..a6fb010 100644
> --- a/meta/recipes-core/netbase/netbase_5.2.bb
> +++ b/meta/recipes-core/netbase/netbase_5.2.bb
> @@ -18,6 +18,7 @@ do_install () {
>         install -m 0644 etc-rpc ${D}${sysconfdir}/rpc
>         install -m 0644 etc-protocols ${D}${sysconfdir}/protocols
>         install -m 0644 etc-services ${D}${sysconfdir}/services
> +       echo 127.0.1.1 "             "${MACHINE} >> ${D}${sysconfdir}/hosts
>  }
>
>  CONFFILES_${PN} = "${sysconfdir}/hosts"
> --
> 1.8.4
>
>

Patch

diff --git a/meta/recipes-core/netbase/netbase_5.2.bb b/meta/recipes-core/netbase/netbase_5.2.bb
index ab7ae65..a6fb010 100644
--- a/meta/recipes-core/netbase/netbase_5.2.bb
+++ b/meta/recipes-core/netbase/netbase_5.2.bb
@@ -18,6 +18,7 @@  do_install () {
 	install -m 0644 etc-rpc ${D}${sysconfdir}/rpc
 	install -m 0644 etc-protocols ${D}${sysconfdir}/protocols
 	install -m 0644 etc-services ${D}${sysconfdir}/services
+	echo 127.0.1.1 "             "${MACHINE} >> ${D}${sysconfdir}/hosts
 }
 
 CONFFILES_${PN} = "${sysconfdir}/hosts"