summaryrefslogtreecommitdiffstats
path: root/iw/welcome_gui.py
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2008-12-04 17:22:56 -1000
committerDavid Cantrell <dcantrell@redhat.com>2008-12-05 10:42:17 -1000
commitc7142dfee35eb97d484bca4cab4d01bdfa5dac62 (patch)
treef03fd52d7651e6f8edb1a9c28227a066cdb135cf /iw/welcome_gui.py
parent6bd08c935dd49f229df3f93016d159bc9422e8b6 (diff)
downloadanaconda-c7142dfee35eb97d484bca4cab4d01bdfa5dac62.tar.gz
anaconda-c7142dfee35eb97d484bca4cab4d01bdfa5dac62.tar.xz
anaconda-c7142dfee35eb97d484bca4cab4d01bdfa5dac62.zip
Prevent network install when no network devices are found (#470144)
A corner case, but if a user boots up with boot.iso and has no network devices available, we get all the way to package selection and user is told they cannot continue. This is after all of the other screens and partitioning. In the welcome screen, perform a check to see if the user has booted the installer to a point where it requires a network install for the packages. If so, tell the user they cannot continue and exit the installer.
Diffstat (limited to 'iw/welcome_gui.py')
-rw-r--r--iw/welcome_gui.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/iw/welcome_gui.py b/iw/welcome_gui.py
index a12a2e104..8dc1a7ef6 100644
--- a/iw/welcome_gui.py
+++ b/iw/welcome_gui.py
@@ -25,16 +25,18 @@ from constants import *
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
-class WelcomeWindow (InstallWindow):
+class WelcomeWindow (InstallWindow):
windowTitle = "" #N_("Welcome")
def __init__ (self, ics):
- InstallWindow.__init__ (self, ics)
+ InstallWindow.__init__ (self, ics)
ics.setGrabNext (1)
+ self.anaconda = None
# WelcomeWindow tag="wel"
def getScreen (self, anaconda):
+ self.anaconda = anaconda
# this is a bit ugly... but scale the image if we're not at 800x600
(w, h) = self.ics.cw.window.get_size_request()
if w >= 800:
@@ -48,3 +50,18 @@ class WelcomeWindow (InstallWindow):
box.add (pix)
return box
+ def getNext (self):
+ if self.anaconda.requiresNetworkInstall():
+ self.anaconda.intf.messageWindow(_("Network Install Required"),
+ _("Your installation source is set to "
+ "a network location, but no netork "
+ "devices were found on your "
+ "system. To avoid a network "
+ "installation, boot with the full "
+ "DVD, full CD set, or do not pass "
+ "a repo= parameter that specifies "
+ "a network source."),
+ type="custom",
+ custom_icon="error",
+ custom_buttons=[_("E_xit Installer")])
+ sys.exit(0)