Re: [PATCH] Do not raise UI dialog in stage2 if network is set in ks (#487503).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Lumens wrote:
What do you think about doing the network.bringUp call in
kickstart.py:Network instead?  That way we've got this done in a central
place and don't need to worry about it for when we need a repo, or
whatever else we require from the network?

What you suggest is much better, patch doing it is attached.

Radek
>From 08d7caaa6d0a0e5b6063ae6474886035535db8c8 Mon Sep 17 00:00:00 2001
From: Radek Vykydal <rvykydal@xxxxxxxxxx>
Date: Fri, 18 Sep 2009 11:33:41 +0200
Subject: [PATCH] Do not raise UI dialog in stage2 if network is set in ks (#487503).

---
 kickstart.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/kickstart.py b/kickstart.py
index 3088666..60a138f 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -578,6 +578,14 @@ class Network(commands.network.F8_Network):
         if nd.gateway != "":
             self.handler.id.network.setGateway(nd.gateway, device)
 
+        needs_net = (self.handler.anaconda.methodstr.startswith("http:") or
+                     self.handler.anaconda.methodstr.startswith("ftp:") or
+                     self.handler.anaconda.methodstr.startswith("nfs:"))
+        if needs_net and not network.hasActiveNetDev():
+            log.info("Bringing up network in stage2 kickstart ...")
+            rc = self.handler.anaconda.id.network.bringUp()
+            log.info("Network setup %s" % (rc and 'succeeded' or 'failed',))
+
         return nd
 
 class MultiPath(commands.multipath.FC6_MultiPath):
-- 
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux