summaryrefslogtreecommitdiffstats
path: root/pyanaconda/rescue.py
diff options
context:
space:
mode:
authorRadek Vykydal <rvykydal@redhat.com>2012-07-17 13:34:38 +0200
committerRadek Vykydal <rvykydal@redhat.com>2012-07-20 14:34:38 +0200
commit7db358be1e1a49b4167f5f0afdb8fc9b58890cf6 (patch)
tree65ee399a0a8a38092f3de545f806452a42a06d68 /pyanaconda/rescue.py
parent0a27b7d2a3b06acaed8ed1ae33a4b7c82a3c3fcc (diff)
downloadanaconda-7db358be1e1a49b4167f5f0afdb8fc9b58890cf6.tar.gz
anaconda-7db358be1e1a49b4167f5f0afdb8fc9b58890cf6.tar.xz
anaconda-7db358be1e1a49b4167f5f0afdb8fc9b58890cf6.zip
remove Network(): list of network devices, final steps
This is almost the final step, the object is not used anymore, I am keeping the rest only not to forget to handle what is left: - I need to look at imageInstall - creating default ifcfg files (setDefaultConfig) should go to dracut or some network initialization step The whole patchset removes anaconda.network object aiming to have all data/configuration in ksdata. The object was needed for our GUI using nm-c-e. We used to keep list of device configuration objects (basically ifcfg dictionaries) in it so that we could tweak them to be able to use nm-c-e for configuration/activation of devices. Now it seems we can do without the list although we still need to do some modifications of ifcfg files at the end of installation (setting onboot policy, setting values for devices used for storage) Hopefuly we'll be able to represent all the data stored in network object in ksdata. Following to the patchset I want to update ksdata with NetworkData objects for all devices and use it to replace network.getDevices(). I have to think where it should happen: - in kickstart.py - or somewhere in pre-gui network initialization (so that it happens also for non-ks cases) where we e.g. activate default device if needed. - or in initialize of standalone spoke - seems to late, we'll need it already for eventual bring-up of network ----- To sum up what the network.py serves for now: Some of network utility functions (more of them are in isys): - hostname sanity checking - ip sanity checking - hostname resolution - status of networking - connected? - list of active devices - logging (ifcfg files) Network configuration: - hostname setting (getting?) - note: storage (lvm, raid) is using hostname for default names - ksdevice resolution (link, MAC address, bootif) - probably we'll be able to remove it, now it is only used for unspecified --device in kickstart network command - write kickstart (currently from ifcfg config) - used by apply method - write dracut arguments (from ifcfg config) - note: depends on storage - modify configuration of target system (ifcfg files) - note: depends on storage - ONBOOT policy (differs on rhel and Fedora) - FCoE - ONBOOT=yes the devices - root on iSCSI - NM_CONTROLLED=no for root on iscsi (there is a NM BZ to fix this) - write /etc/sysconfig/network configuration - this should be reviewed - copy network configuration files to system - ifcfg-<iface> files and wireless key-<iface> files - dhclient-<iface>.conf files (dhcpclass and dhcp timeout which is not supported in noloader) - /etc/sysconfig/network - /etc/resolv.conf - genrated by NM - /etc/udev/rules.d/70-persistent-net.rules (review) - disable ipv6 on target system (noipv6 boot/ks option)
Diffstat (limited to 'pyanaconda/rescue.py')
-rw-r--r--pyanaconda/rescue.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/pyanaconda/rescue.py b/pyanaconda/rescue.py
index 5854e25a1..284077bbc 100644
--- a/pyanaconda/rescue.py
+++ b/pyanaconda/rescue.py
@@ -93,7 +93,7 @@ class RescueInterface(InstallInterfaceBase):
return OkCancelWindow(self.screen, title, text)
def enableNetwork(self, anaconda):
- if len(anaconda.network.netdevices) == 0:
+ if len(network.getDevices()) == 0:
return False
from textw.netconfig_text import NetworkConfiguratorText
w = NetworkConfiguratorText(self.screen, anaconda)
@@ -171,18 +171,6 @@ def makeResolvConf(instPath):
f.write(buf)
f.close()
-#
-# Write out something useful for networking and start interfaces
-#
-def startNetworking(network, intf):
- # do lo first
- if os.system("/usr/sbin/ifconfig lo 127.0.0.1"):
- log.error("Error trying to start lo in rescue.py::startNetworking()")
-
- # start up dhcp interfaces first
- if not network.bringUp():
- log.error("Error bringing up network interfaces")
-
def runShell(screen = None, msg=""):
if screen:
screen.suspend()
@@ -238,7 +226,6 @@ def doRescue(anaconda):
"will not be available in rescue mode."))
break
- startNetworking(anaconda.network, anaconda.intf)
break
else:
break