diff options
author | Radek Vykydal <rvykydal@redhat.com> | 2012-07-24 13:42:25 +0200 |
---|---|---|
committer | Radek Vykydal <rvykydal@redhat.com> | 2012-08-27 15:50:37 +0200 |
commit | e2307897400700b10d60b0a80e7b15ef7d6f1772 (patch) | |
tree | a0d097f9fea1e90e30b5c8aaa8906565afb5a51f /pyanaconda/install.py | |
parent | 6c27d6afb57f8b6178723b7788ce54e75dda765d (diff) | |
download | anaconda-e2307897400700b10d60b0a80e7b15ef7d6f1772.tar.gz anaconda-e2307897400700b10d60b0a80e7b15ef7d6f1772.tar.xz anaconda-e2307897400700b10d60b0a80e7b15ef7d6f1772.zip |
networking: write configuration in doInstall
Short story:
Ifcfg files are (still) copied from installer environment instead of
generating from ksdata[1].
Details:
Ifcfg files can be created during installation
- in dracut: based on boot options and kickstart
- in anaconda: missing default ifcfg files[2]
- in GUI using nm-c-e
Going through ksdata here (update ksdata in spoke.apply and write ifcfg
files from ksdata at the end of install - writeNetworkConf in doInstall [3])
- which is what we would generally do for other spokes - is not necessary,
and has some caveats:
We'd need to update ks network command to mirror all configuration doable
in ifcfg files with nm-c-e (plus wireless credentials stored in keys-<device>
files, routing stored in yet another network-scripts files) and keep
up with every update of nm-c-e options instead of letting nm-c-e just
write the configuration for us. Also NM can update ifcfg files on its
own after they are written - another opprotunity for missync.
[1] Beside ifcfg files we also copy /etc/sysconfig/network-scripts/keys-<device>
files. We might want to copy also routing files created in nm-c-e.
[2] this should go to dracut IMO.
[3] such would be the chain:
- dracut writes ifcfg files
- NM can update ifcfg when activating device
(does anaconda need to update ksdata ?)
- anaconda can write missing default ifcfg files
- nm-c-e can modify ifcfg files (GUI configuration)
- anaconda stores ifcfg to ksdata (spoke.apply)
- anaconda dumps ksdata to ifcfg on /mnt/sysimage (doInstall)
- anaconda modifies configuration for storage devices,
and to set ONBOOT default - currently this can't precede the previous
step because we are changing NM_CONTROLLED which is not mirrored
in ksdata, so we need also to sync ksdata in this step
Diffstat (limited to 'pyanaconda/install.py')
-rw-r--r-- | pyanaconda/install.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pyanaconda/install.py b/pyanaconda/install.py index b5a61523d..0652d464a 100644 --- a/pyanaconda/install.py +++ b/pyanaconda/install.py @@ -25,6 +25,7 @@ from pyanaconda.storage import turnOnFilesystems from pyanaconda.bootloader import writeBootLoader from pyanaconda.progress import progress_report from pyanaconda.users import createLuserConf, Users +from pyanaconda.network import writeNetworkConf import gettext _ = lambda x: gettext.ldgettext("anaconda", x) @@ -86,6 +87,8 @@ def doInstall(storage, payload, ksdata, instClass): ksdata.keyboard.execute(storage, ksdata, instClass) ksdata.timezone.execute(storage, ksdata, instClass) + writeNetworkConf(storage, ksdata, instClass) + # Creating users and groups requires some pre-configuration. u = Users() createLuserConf(ROOT_PATH, algoname=u.getPassAlgo(ksdata.authconfig.authconfig)) |