Hi All, I am trying to add a network configuration check (patch is attached) to anaconda 13.21.117 (OL6.1). The check is added into "getNext" function on "network" page in gui mode. But it is working only if network is configured before (for example in "updates" mode). I can't find a solution how to resolve this issue. Do you have any ideas? -- Mykola Marzhan PortaOne, Inc., Release Engineer delgod@xxxxxxxxxxxx Tel: +1-866-SIP VOIP (+1 866 747 86 47) ext. 7159
--- anaconda-13.21.117/iw/network_gui.py 2011-07-18 17:30:10.000000000 +0300 +++ anaconda-13.21.117_fix/iw/network_gui.py 2011-07-18 17:27:45.000000000 +0300 @@ -102,5 +102,17 @@ self.anaconda.id.network.setHostname(hostname) + + dhcp_devs = self.anaconda.id.network.getDhcpIfaces() + if dhcp_devs: + messageDhcp = self.intf.messageWindow(_("Network configuration"), + _("At least one network interface is configured " + "via DHCP. PortaSwitch servers must be " + "configured with static IP addresses.\n" + "Please setup IP addresses manually."), + type="custom", custom_buttons=[_("Configure _Network"), _("_Ignore")]) + if not messageDhcp: + self._setupNetwork() + return None def NMCEExited(pid, condition, anaconda): --- anaconda-13.21.117/network.py 2010-08-30 22:31:44.000000000 +0300 +++ anaconda-13.21.117_fix/network.py 2011-03-24 15:11:19.000000000 +0200 @@ -310,6 +318,7 @@ self.overrideDHCPhostname = False self.update() + self.updateActiveDevices() # enable ONBOOT for all devices # We want wireless devices to be nm controlled by default self.controlWireless() @@ -482,6 +482,14 @@ ifaces.append(iface) return ifaces + def getDhcpIfaces(self): + ifaces = [] + for iface, device in self.netdevices.items(): + if (device.get('ONBOOT') == "yes" and + device.get('BOOTPROTO').lower() == "dhcp"): + ifaces.append(iface) + return ifaces + def controlWireless(self): for devname, device in self.netdevices.items(): if isys.isWireless(devname):
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list