[ovs-dev] [PATCH v2] Replace most uses of and references to "ifconfig" by "ip".

Greg Rose gvrose8192 at gmail.com
Fri May 26 15:52:15 UTC 2017


On Fri, 2017-05-26 at 08:46 -0700, Ben Pfaff wrote:
> On Fri, May 26, 2017 at 10:53:32AM -0400, Russell Bryant wrote:
> > On Fri, May 26, 2017 at 12:49 AM, Ben Pfaff <blp at ovn.org> wrote:
> > > It's becoming more common that OSes include "ip" but not "ifconfig", so
> > > it's best to avoid using the latter.  This commit removes most references
> > > to "ifconfig" and replaces them by "ip".  It also adds a build-time check
> > > to make it harder to introduce new uses of "ifconfig".
> > >
> > > Signed-off-by: Ben Pfaff <blp at ovn.org>
> > > ---
> > > I tested this via "make check", only.
> > > v1->v2: Remove unrelated change (thanks Joe!).
> > >
> > >  Documentation/faq/configuration.rst                |  2 +-
> > >  Documentation/faq/issues.rst                       | 19 +++++++-------
> > >  Documentation/faq/vlan.rst                         |  6 ++---
> > >  Documentation/howto/dpdk.rst                       | 10 ++++----
> > >  Documentation/howto/kvm.rst                        |  5 ++--
> > >  Documentation/ref/ovs-vlan-test.8.rst              |  3 ++-
> > >  Documentation/tutorials/ovs-advanced.rst           | 11 ++++----
> > >  Makefile.am                                        | 14 +++++++++++
> > >  python/ovstest/util.py                             | 24 +++++++++---------
> > >  tests/interface-reconfigure.at                     | 29 +++++++++++-----------
> > >  utilities/bugtool/ovs-bugtool.in                   |  6 ++---
> > >  utilities/ovs-ofctl.8.in                           |  4 +--
> > >  utilities/ovs-vsctl.8.in                           |  2 +-
> > >  ...ensource_libexec_InterfaceReconfigureVswitch.py |  6 ++---
> > >  .../opt_xensource_libexec_interface-reconfigure    |  4 +--
> > >  15 files changed, 79 insertions(+), 66 deletions(-)
> > >
> > > diff --git a/Documentation/faq/issues.rst b/Documentation/faq/issues.rst
> > > index c60336a10569..8ef207bbee6c 100644
> > > --- a/Documentation/faq/issues.rst
> > > +++ b/Documentation/faq/issues.rst
> > > @@ -43,8 +43,8 @@ eth0.  Help!
> > >      itself.  For example, assuming that eth0's IP address is 192.168.128.5, you
> > >      could run the commands below to fix up the situation::
> > >
> > > -        $ ifconfig eth0 0.0.0.0
> > > -        $ ifconfig br0 192.168.128.5
> > > +        $ ip addr flush dev eth0
> > > +        $ ip addr addr 192.168.128.5 dev br0
> > 
> > Typo: "ip addr add"
> > 
> > > @@ -299,13 +299,13 @@ network, but it doesn't work.  Why not?
> > >
> > >          $ ovs-vsctl add-br br0
> > >          $ ovs-vsctl add-port br0 int0 -- set Interface int0 type=internal
> > > -        $ ifconfig int0 192.168.0.123
> > > +       $ ip addr addr 192.168.0.123 dev int0
> > 
> > and here.
> 
> Thanks, I fixed both of these.
> 
> > > @@ -656,8 +656,8 @@ devices to bridge ``br0``. Once complete, follow the below steps:
> > >
> > >     Configure IP and enable interfaces::
> > >
> > > -       $ ifconfig eth0 5.5.5.1/24 up
> > > -       $ ifconfig eth1 90.90.90.1/24 up
> > > +       $ ip addr add 5.5.5.1/24 dev eth0
> > > +       $ ip addr add 90.90.90.1/24 dev eth1
> > 
> > 
> > Is "ip link set eth0 up" needed here too to be equivalent?
> 
> I am not sure.  It cannot hurt, so I added it.

Yes, it is needed.

- Greg

> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev





More information about the dev mailing list