diff mbox

[ovs-dev] debian: Rewrite "ifconfig" to "ip" command.

Message ID 1489032080-4776-1-git-send-email-nic@opencloud.tech
State Accepted
Headers show

Commit Message

nickcooper-zhangtonghao March 9, 2017, 4:01 a.m. UTC
Some debian distribution may not contain the ifconfig.
We use the ip command instead of ifconfig in debian/ifupdown.sh

Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-March/329503.html
CC: prochazka <prochazka@cortex.cz>
Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
---
 debian/ifupdown.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Ben Pfaff March 17, 2017, 8:06 p.m. UTC | #1
On Wed, Mar 08, 2017 at 08:01:20PM -0800, nickcooper-zhangtonghao wrote:
> Some debian distribution may not contain the ifconfig.
> We use the ip command instead of ifconfig in debian/ifupdown.sh
> 
> Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-March/329503.html
> CC: prochazka <prochazka@cortex.cz>
> Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>

Thanks, applied to master and branch-2.7.
diff mbox

Patch

diff --git a/debian/ifupdown.sh b/debian/ifupdown.sh
index fe15b71..c917e62 100755
--- a/debian/ifupdown.sh
+++ b/debian/ifupdown.sh
@@ -50,24 +50,24 @@  if [ "${MODE}" = "start" ]; then
                     "${IFACE}" ${IF_OVS_OPTIONS} \
                     ${OVS_EXTRA+-- $OVS_EXTRA}
 
-                ifconfig "${IFACE}" up
+                ip link set "${IFACE}" up
                 ;;
         OVSIntPort)
                 ovs_vsctl -- --may-exist add-port "${IF_OVS_BRIDGE}"\
                     "${IFACE}" ${IF_OVS_OPTIONS} -- set Interface "${IFACE}"\
                     type=internal ${OVS_EXTRA+-- $OVS_EXTRA}
 
-                ifconfig "${IFACE}" up
+                ip link set "${IFACE}" up
                 ;;
         OVSBond)
                 ovs_vsctl -- --fake-iface add-bond "${IF_OVS_BRIDGE}"\
                     "${IFACE}" ${IF_OVS_BONDS} ${IF_OVS_OPTIONS} \
                     ${OVS_EXTRA+-- $OVS_EXTRA}
 
-                ifconfig "${IFACE}" up
+                ip link set "${IFACE}" up
                 for slave in ${IF_OVS_BONDS}
                 do
-                    ifconfig "${slave}" up
+                    ip link set "${IFACE}" up
                 done
                 ;;
         OVSPatchPort)