diff --git a/common/src/stack/pylib/stack/wizard.py b/common/src/stack/pylib/stack/wizard.py index 7ed774550..835ae121c 100644 --- a/common/src/stack/pylib/stack/wizard.py +++ b/common/src/stack/pylib/stack/wizard.py @@ -1,7 +1,7 @@ #! /opt/stack/bin/python # # @copyright@ -# Copyright (c) 2006 - 2019 Teradata +# Copyright (c) 2006 - 2020 Teradata # All rights reserved. Stacki(r) v5.x stacki.com # https://github.com/Teradata/stacki/blob/master/LICENSE.txt # @copyright@ @@ -16,7 +16,6 @@ import socket from xml.etree.ElementTree import Element, SubElement, ElementTree - class Attr: Info_FQDN = "" Kickstart_Keyboard = "us" @@ -131,10 +130,11 @@ def setNetwork(self, interface, mac, addr, netmask): if os.path.exists(ifDhcpFile): os.remove(ifDhcpFile) # Force network reconfiguration - cmd = ['/sbin/ifconfig', interface, addr, 'netmask', netmask] + ip_mask = ipaddress.ip_interface(join(addr,'/',netmask)) + cmd = ['/sbin/ip', 'addr', 'add', ip_mask.with_prefixlen, 'dev', interface] p = subprocess.Popen(cmd, stdout=subprocess.PIPE) # Bring up network - cmd = ['/sbin/ifconfig', interface, 'up'] + cmd = ['/sbin/ip', 'link', 'set', interface, 'up'] p = subprocess.Popen(cmd, stdout=subprocess.PIPE) def setHostname(self, hostname):