Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@opendreambox.org>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] iproute2: create symbol link '/bin/ip' to '/sbin/ip.iproute2'
Date: Fri, 13 Jul 2018 11:14:31 +0200	[thread overview]
Message-ID: <20180713111431.242e1496@t460p> (raw)
In-Reply-To: <C2A454FDE6C23F41BD5011E2458C46C9F2ED1D8F@ALA-MBD.corp.ad.wrs.com>

On Fri, 13 Jul 2018 02:06:41 +0000
"Bai, Haiqing" <Haiqing.Bai@windriver.com> wrote:

> Yes,  you are right.
> 
> The reasons that why not fix ifupdown like below:
> 1.  Some packages assume 'iproute' is their default dependency, not only 'ifupdown'.
> 
> 2. Of course,  the source code of 'ifupdown' is very ugly,  not only  C code but also configure files used lots of shell command with absolute path:

[...]

> 3.  I have checked all the shell commands used in the current version ,  except "/bin/ip",   other commands' path are right  and same to the path in our rootfs. 

I just noticed that Debian and Ubuntu install ip to /bin and create a symlink from /sbin/ip to /bin/ip. How do other distributions like Fedora handle it?

Where does busybox install it to?

If ip gets provided by both iproute2 and busybox, will there be conflicts? If the new symlink doesn't get handled by update-alternatives, /bin/ip might point to iproute2 and /sbin/ip to busybox at the same time.

I think that the ip binary should be moved to /bin and the symlink in /sbin should be handled by update-alternatives, too, for both busybox and iproute2.

Regards,
Andreas


> 
> B,R
> Haiqing Bai  
> 
> -----Original Message-----
> From: MacLeod, Randy 
> Sent: 2018年7月13日 4:19
> To: Andreas Oberritter; openembedded-core@lists.openembedded.org; Bai, Haiqing
> Subject: Re: [OE-core] [PATCH] iproute2: create symbol link '/bin/ip' to '/sbin/ip.iproute2'
> 
> On 07/11/2018 04:41 AM, Andreas Oberritter wrote:
> > On Wed, 11 Jul 2018 14:01:17 +0800
> > Haiqing Bai <Haiqing.Bai@windriver.com> wrote:
> >   
> >> Some applications which depend on iproute/iproute2 need to
> >> run '/sbin/ip.iproute2' through the symbol link '/bin/ip'
> >> e.g ifupdown.  
> > 
> > Update-alternatives is supposed to create this link already.  
> 
> I assume that update-alternatives is creating
>     /sbin/ip -> /sbin/ip.iproute2
> but for some reason ipupdown is looking for
>     /bin/ip
> 
> Is that right Haiqing ?
> 
> Why not fix ifupdown?
> 
> ../Randy
> 
> >   
> >>
> >> Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
> >> ---
> >>   meta/recipes-connectivity/iproute2/iproute2.inc | 2 ++
> >>   1 file changed, 2 insertions(+)
> >>
> >> diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc
> >> index 4fbfec6f08..71d04a1021 100644
> >> --- a/meta/recipes-connectivity/iproute2/iproute2.inc
> >> +++ b/meta/recipes-connectivity/iproute2/iproute2.inc
> >> @@ -29,6 +29,8 @@ do_configure_append () {
> >>   do_install () {
> >>       oe_runmake DESTDIR=${D} install
> >>       mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2
> >> +    install -d ${D}${base_bindir}
> >> +    ln -s ${base_sbindir}/ip.iproute2 ${D}${base_bindir}/ip
> >>       install -d ${D}${datadir}
> >>       mv ${D}/share/* ${D}${datadir}/ || true
> >>       rm ${D}/share -rf || true  
> >   
> 
> 



      reply	other threads:[~2018-07-13  9:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11  6:01 [PATCH] iproute2: create symbol link '/bin/ip' to '/sbin/ip.iproute2' Haiqing Bai
2018-07-11  8:41 ` Andreas Oberritter
2018-07-12 20:19   ` Randy MacLeod
2018-07-13  2:06     ` Bai, Haiqing
2018-07-13  9:14       ` Andreas Oberritter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180713111431.242e1496@t460p \
    --to=obi@opendreambox.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox