[PATCH 3/3] Write 'text'/'cmdline' in anaconda-ks.cfg in text/cmdline mode

Will Woods wwoods at redhat.com
Mon Feb 24 21:12:43 UTC 2014


If the install is happening in text/cmdline mode, we should end up with
'text' or 'cmdline' in the resulting anaconda-ks.cfg.

So: once we have determined anaconda.displayMode, set the appropriate
ksdata.displaymode.displayMode so that we'll write it to the kickstart
later.

(Note that we do this after setupDisplay because setupDisplay can change
displayMode - e.g. by forcing text-mode on low-memory systems or by
asking the user if they want to use VNC instead.)
---
 anaconda | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/anaconda b/anaconda
index 897ddc7..faea86b 100755
--- a/anaconda
+++ b/anaconda
@@ -1036,6 +1036,11 @@ if __name__ == "__main__":
     # if we're in text mode, the resulting system should be too
     if anaconda.displayMode != 'g':
         anaconda.ksdata.skipx.skipx = True
+        from pyanaconda.constants import DISPLAY_MODE_CMDLINE, DISPLAY_MODE_TEXT
+        if anaconda.displayMode == 'c':
+            anaconda.ksdata.displaymode.displayMode = DISPLAY_MODE_CMDLINE
+        else:
+            anaconda.ksdata.displaymode.displayMode = DISPLAY_MODE_TEXT
 
     if anaconda.rescue:
         from pyanaconda import rescue
-- 
1.8.5.3



More information about the anaconda-patches mailing list