[PATCH 5/6] Add switch for script mode and fix graphics check in anaconda

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

 



If mode is already set to something other than gui there is no need
to force it to text mode.
---
 anaconda |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/anaconda b/anaconda
index 70dd717..f21ed47 100755
--- a/anaconda
+++ b/anaconda
@@ -157,6 +157,7 @@ def parseOptions(argv = None):
                   default="g")
     op.add_option("-G", "--graphical", dest="display_mode", action="store_const", const="g")
     op.add_option("-T", "--text", dest="display_mode", action="store_const", const="t")
+    op.add_option("-S", "--script", dest="display_mode", action="store_const", const="s")
 
     # Network
     op.add_option("--noipv4", action="store_true", default=False)
@@ -348,7 +349,7 @@ def check_memory(anaconda, opts, display_mode=None):
         sys.exit(1)
 
     # override display mode if machine cannot nicely run X
-    if display_mode not in ('t', 'c') and not flags.usevnc:
+    if display_mode not in ('t', 'c', 's') and not flags.usevnc:
         needed_ram += int(isys.GUI_INSTALL_EXTRA_RAM / 1024)
         reason = reason_graphical
 
@@ -456,8 +457,9 @@ def setupDisplay(anaconda, opts):
         # now determine if we're going to run in GUI or TUI mode
         #
         # if no X server, we have to use text mode
-        if not flags.livecdInstall and not iutil.isS390() and \
-           not os.access("/usr/bin/Xorg", os.X_OK):
+        if anaconda.displayMode == 'g' and not flags.livecdInstall \
+           and not iutil.isS390() \
+           and not os.access("/usr/bin/Xorg", os.X_OK):
              stdoutLog.warning(_("Graphical installation is not available. "
                                  "Starting text mode."))
              time.sleep(2)
-- 
1.7.4.4

_______________________________________________
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