[PATCH] Start the network before the display (#1167103)

David Shea dshea at redhat.com
Fri Dec 19 16:55:30 UTC 2014


Sometimes the display is on the network.

If there is a kickstart file containing a static network configuration,
and dracut started the network using dhcp (for example, vnc was on the
command line but no ip arguments were), it's possible to change
addresses after VNC has started, which doesn't work real well.
---
 anaconda | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/anaconda b/anaconda
index 80b39f6..4ded503 100755
--- a/anaconda
+++ b/anaconda
@@ -1215,6 +1215,12 @@ if __name__ == "__main__":
     import blivet
     blivet.enable_installer_mode()
 
+    # Initialize the network now, in case the display needs it
+    from pyanaconda.network import networkInitialize, wait_for_connecting_NM_thread
+
+    networkInitialize(ksdata)
+    threadMgr.add(AnacondaThread(name=constants.THREAD_WAIT_FOR_CONNECTING_NM, target=wait_for_connecting_NM_thread, args=(ksdata,)))
+
     # now start the interface
     setupDisplay(anaconda, opts, addon_paths)
 
@@ -1266,7 +1272,6 @@ if __name__ == "__main__":
 
     from blivet import storageInitialize
     from pyanaconda.packaging import payloadMgr
-    from pyanaconda.network import networkInitialize, wait_for_connecting_NM_thread
     from pyanaconda.timezone import time_initialize
 
     if flags.rescue_mode:
@@ -1274,14 +1279,12 @@ if __name__ == "__main__":
     else:
         cleanPStore()
 
-    networkInitialize(ksdata)
     if not flags.dirInstall:
         threadMgr.add(AnacondaThread(name=constants.THREAD_STORAGE, target=storageInitialize,
                                      args=(anaconda.storage, ksdata, anaconda.protected)))
         threadMgr.add(AnacondaThread(name=constants.THREAD_TIME_INIT, target=time_initialize,
                                      args=(ksdata.timezone, anaconda.storage, anaconda.bootloader)))
 
-    threadMgr.add(AnacondaThread(name=constants.THREAD_WAIT_FOR_CONNECTING_NM, target=wait_for_connecting_NM_thread, args=(ksdata,)))
 
     # Fallback to default for interactive or for a kickstart with no installation method.
     fallback = not (flags.automatedInstall and ksdata.method.method)
-- 
2.1.0



More information about the anaconda-patches mailing list