summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2012-09-28 10:29:48 -0700
committerJesse Keating <jkeating@redhat.com>2012-10-01 13:56:50 -0700
commit95b1406f9f23293dcf06def20eaf89171ca31848 (patch)
tree3cdddfae20810ab4e3ff09e7df33641903063749 /anaconda
parent445fdc30986545393d049e20cbbe55a7f94f53c8 (diff)
downloadanaconda-95b1406f9f23293dcf06def20eaf89171ca31848.tar.gz
anaconda-95b1406f9f23293dcf06def20eaf89171ca31848.tar.xz
anaconda-95b1406f9f23293dcf06def20eaf89171ca31848.zip
Don't ask for VNC if we can't do it
Moves the checks that were in the VNC question out to the prep for the VNC question. We don't get a simple true/false out of the question anymore.
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda11
1 files changed, 10 insertions, 1 deletions
diff --git a/anaconda b/anaconda
index 0e477145f..411bb075c 100755
--- a/anaconda
+++ b/anaconda
@@ -406,6 +406,7 @@ def setupDisplay(anaconda, opts):
from pyanaconda.ui.tui.simpleline import App
from pyanaconda.ui.tui.spokes.askvnc import AskVNCSpoke
from pykickstart.constants import DISPLAY_MODE_TEXT
+ from pyanaconda import network
graphical_failed = 0
vncS = vnc.VncServer() # The vnc Server object.
@@ -460,6 +461,14 @@ def setupDisplay(anaconda, opts):
if anaconda.ksdata.displaymode.displayMode == DISPLAY_MODE_TEXT:
flags.vncquestion = False
+ # disable VNC question if we don't have network
+ if not network.hasActiveNetDev():
+ flags.vncquestion = False
+
+ # disable VNC question if we don't have X
+ if not os.access('/usr/bin/Xvnc', os.X_OK):
+ flags.vncquestion = False
+
if os.environ.has_key('DISPLAY'):
flags.preexisting_x11 = True
@@ -549,7 +558,7 @@ def setupDisplay(anaconda, opts):
set_x_resolution(opts.runres)
if anaconda.displayMode == 't' and graphical_failed and \
- not anaconda.ksdata.vnc.enabled:
+ flags.vncquestion and not anaconda.ksdata.vnc.enabled:
app = App("VNC Question")
spoke = AskVNCSpoke(app, anaconda.ksdata)
app.schedule_screen(spoke)