summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2012-03-20 11:12:19 -0400
committerWill Woods <wwoods@redhat.com>2012-03-22 19:11:13 -0400
commitc1046f244a161b0e13ae99652fa38bd80a2bca7f (patch)
tree1a6f9d3bf1ae55b94693c7c2ce2ef3a68194b401 /anaconda
parentd93b8ada76f1811e87a6928299d0b5188a74e73a (diff)
downloadanaconda-c1046f244a161b0e13ae99652fa38bd80a2bca7f.tar.gz
anaconda-c1046f244a161b0e13ae99652fa38bd80a2bca7f.tar.xz
anaconda-c1046f244a161b0e13ae99652fa38bd80a2bca7f.zip
Default to text-mode if 'console=XXX' was provided (#804506)
loader used to set '--text' based on the boot args. But we can parse our own boot args now, thank you very much.
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda11
1 files changed, 8 insertions, 3 deletions
diff --git a/anaconda b/anaconda
index dcd3c4e63..0216a1b61 100755
--- a/anaconda
+++ b/anaconda
@@ -187,7 +187,7 @@ def getAnacondaVersion():
from pyanaconda import _isys
return _isys.getAnacondaVersion()
-def parseOptions(argv = None):
+def parseOptions(argv=None, cmdline=None):
from pyanaconda.anaconda_optparse import AnacondaOptionParser
op = AnacondaOptionParser(version="%prog " + getAnacondaVersion(),
bootarg_prefix="inst.", require_prefix=False)
@@ -264,7 +264,12 @@ def parseOptions(argv = None):
op.add_option("--memcheck", action="store_true", default=True)
op.add_option("--no-memcheck", action="store_false", dest="memcheck")
- (opts, args) = op.parse_args(argv)
+ # some defaults change based on cmdline flags
+ if cmdline is not None:
+ if "console" in cmdline:
+ op.set_defaults(display_mode="t")
+
+ (opts, args) = op.parse_args(argv, cmdline=cmdline)
return (opts, args, op.deprecated_bootargs)
def setupPythonPath():
@@ -597,8 +602,8 @@ if __name__ == "__main__":
setupPythonUpdates()
# do this early so we can set flags before initializing logging
- (opts, args, depr) = parseOptions()
from pyanaconda.flags import flags
+ (opts, args, depr) = parseOptions(cmdline=flags.cmdline)
if opts.images:
flags.imageInstall = True