diff options
Diffstat (limited to 'xenserver')
-rw-r--r-- | xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py | 6 | ||||
-rwxr-xr-x | xenserver/opt_xensource_libexec_interface-reconfigure | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py index c65fb3da4..53468b706 100644 --- a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py +++ b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py @@ -1,5 +1,5 @@ # Copyright (c) 2008,2009,2011 Citrix Systems, Inc. -# Copyright (c) 2009,2010,2011,2012,2013 Nicira, Inc. +# Copyright (c) 2009,2010,2011,2012,2013,2017 Nicira, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published @@ -25,7 +25,7 @@ def netdev_down(netdev): if not netdev_exists(netdev): log("netdev: down: device %s does not exist, ignoring" % netdev) return - run_command(["/sbin/ifconfig", netdev, 'down']) + run_command(["/sbin/ip", "link", "set", netdev, 'down']) def netdev_up(netdev, mtu=None): """Bring up a bare network device""" @@ -37,7 +37,7 @@ def netdev_up(netdev, mtu=None): else: mtu = [] - run_command(["/sbin/ifconfig", netdev, 'up'] + mtu) + run_command(["/sbin/ip", "link", "set", netdev, 'up'] + mtu) # This is a list of drivers that do support VLAN tx or rx acceleration, but # to which the VLAN bug workaround should not be applied. This could be diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure index ea4a7421f..a82043fb5 100755 --- a/xenserver/opt_xensource_libexec_interface-reconfigure +++ b/xenserver/opt_xensource_libexec_interface-reconfigure @@ -147,7 +147,7 @@ def netdev_remap_name(pif, already_renamed=[]): def rename_netdev(old_name, new_name): raise Error("Trying to rename %s to %s - This functionality has been removed" % (old_name, new_name)) # log("Changing the name of %s to %s" % (old_name, new_name)) - # run_command(['/sbin/ifconfig', old_name, 'down']) + # run_command(['/sbin/ip', 'link', 'set', old_name, 'down']) # if not run_command(['/sbin/ip', 'link', 'set', old_name, 'name', new_name]): # raise Error("Could not rename %s to %s" % (old_name, new_name)) @@ -191,7 +191,7 @@ def ifdown(netdev): return if not os.path.exists("%s/etc/sysconfig/network-scripts/ifcfg-%s" % (root_prefix(), netdev)): log("ifdown: device %s exists but ifcfg-%s does not" % (netdev,netdev)) - run_command(["/sbin/ifconfig", netdev, 'down']) + run_command(["/sbin/ip", "link", "set", netdev, 'down']) return run_command(["/sbin/ifdown", netdev]) |