[PATCH] Add help texts for more Anaconda CLI options

Martin Kolman mkolman at redhat.com
Fri Jun 20 11:17:36 UTC 2014


-m/--method, --askmethod, --repo, --stage2, --noverifyssl, --liveinst,
--resolution, --usefbx, --vnc, --vncconnect, --vncpassword, --xdriver,
--keymap, --lang, --loglevel, --syslog, --noselinux, --selinux,
--nompath and --mpath now have help texts.

Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
 anaconda                  |  53 ++++++++++++++----------
 data/anaconda_options.txt | 100 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 133 insertions(+), 20 deletions(-)

diff --git a/anaconda b/anaconda
index c48a995..4fa00ce 100755
--- a/anaconda
+++ b/anaconda
@@ -279,34 +279,47 @@ def parseArguments(argv=None, boot_cmdline=None):
     ap.add_argument("--armplatform", dest="armPlatform", type=str)
     ap.add_argument("--multilib", dest="multiLib", action="store_true", default=False)
 
-    ap.add_argument("-m", "--method", dest="method", default=None)
-    ap.add_argument("--askmethod", dest="askmethod", action="store_true", default=False)
-    ap.add_argument("--repo", dest="method", default=None)
-    ap.add_argument("--stage2", dest="stage2", default=None)
-    ap.add_argument("--noverifyssl", action="store_true", default=False)
-    ap.add_argument("--liveinst", action="store_true", default=False)
+    ap.add_argument("-m", "--method", dest="method", default=None, metavar="METHOD",
+                    help=help_parser.help_text("method"))
+    ap.add_argument("--askmethod", dest="askmethod", action="store_true", default=False,
+                    help=help_parser.help_text("askmethod"))
+    ap.add_argument("--repo", dest="method", default=None, metavar="REPO_URL",
+                    help=help_parser.help_text("repo"))
+    ap.add_argument("--stage2", dest="stage2", default=None, metavar="STAGE2_URL",
+                    help=help_parser.help_text("stage2"))
+    ap.add_argument("--noverifyssl", action="store_true", default=False,
+                    help=help_parser.help_text("noverifyssl"))
+    ap.add_argument("--liveinst", action="store_true", default=False,
+                    help=help_parser.help_text("liveinst"))
 
     # Display
-    ap.add_argument("--resolution", dest="runres", default=None)
-    ap.add_argument("--usefbx", dest="xdriver", action="store_const", const="fbdev")
-    ap.add_argument("--vnc", action="store_true", default=False)
-    ap.add_argument("--vncconnect")
-    ap.add_argument("--vncpassword", default="")
-    ap.add_argument("--xdriver", dest="xdriver", action="store", type=str, default=None)
+    ap.add_argument("--resolution", dest="runres", default=None, metavar="WIDTHxHEIGHT",
+                    help=help_parser.help_text("resolution"))
+    ap.add_argument("--usefbx", dest="xdriver", action="store_const", const="fbdev",
+                    help=help_parser.help_text("usefbx"))
+    ap.add_argument("--vnc", action="store_true", default=False,
+                    help=help_parser.help_text("vnc"))
+    ap.add_argument("--vncconnect", metavar="HOST:PORT", help=help_parser.help_text("vncconnect"))
+    ap.add_argument("--vncpassword", default="", metavar="PASSWORD",
+                    help=help_parser.help_text("vncpassword"))
+    ap.add_argument("--xdriver", dest="xdriver", action="store", type=str,
+                    default=None, metavar="DRIVER", help=help_parser.help_text("xdriver"))
 
     # Language
-    ap.add_argument("--keymap")
-    ap.add_argument("--lang")
+    ap.add_argument("--keymap", metavar="KEYMAP", help=help_parser.help_text("keymap"))
+    ap.add_argument("--lang", metavar="LANG", help=help_parser.help_text("lang"))
 
     # Obvious
-    ap.add_argument("--loglevel")
-    ap.add_argument("--syslog")
+    ap.add_argument("--loglevel", metavar="LEVEL", help=help_parser.help_text("loglevel"))
+    ap.add_argument("--syslog", metavar="HOST[:PORT]", help=help_parser.help_text("syslog"))
 
-    ap.add_argument("--noselinux", dest="selinux", action="store_false", default=True)
-    ap.add_argument("--selinux", action="store_true")
+    ap.add_argument("--noselinux", dest="selinux", action="store_false",
+                    default=True, help=help_parser.help_text("noselinux"))
+    ap.add_argument("--selinux", action="store_true", help=help_parser.help_text("selinux"))
 
-    ap.add_argument("--nompath", dest="mpath", action="store_false", default=True)
-    ap.add_argument("--mpath", action="store_true")
+    ap.add_argument("--nompath", dest="mpath", action="store_false", default=True,
+                    help=help_parser.help_text("nompath"))
+    ap.add_argument("--mpath", action="store_true", help=help_parser.help_text("mpath"))
 
     ap.add_argument("--nodmraid", dest="dmraid", action="store_false", default=True,
                     help=help_parser.help_text("nodmraid"))
diff --git a/data/anaconda_options.txt b/data/anaconda_options.txt
index f1414f6..e2b84c5 100644
--- a/data/anaconda_options.txt
+++ b/data/anaconda_options.txt
@@ -1,3 +1,103 @@
+method
+This option is deprecated in favor of the repo option. For now, it does the same thing as repo,
+but will be removed in the future.
+
+askmethod
+Do not automatically configure the Installation Source spoke, but require the user to enter it and
+choose an option. If you don't want to wait for the default configuration to be processed before
+you can enter the spoke and change it, you can pass this option.
+
+repo
+This option tells Anaconda where to find the packages for installation. This option must point to a
+valid yum repository (or, for some protocols, a Fedora DVD ISO image). It is analogous to the older
+method option, but repo makes it more clear exactly what is meant. This option may appear only once
+on the command line. It corresponds to the kickstart command install (whereas kickstart command repo
+is used for additional repositories). As of Fedora 16, you can (optionally) add a specific .iso file
+to the path. If no inst.root or inst.stage2 parameter is passed, this location will also be used
+as the source for the installer runtime image.
+For more information about the REPO_URL format check the Anaconda option documentation, available on:
+http://fedoraproject.org/wiki/Anaconda_Boot_Options
+
+stage2
+The STAGE2_URL specifies a path to a repository containing a stage2 (squashfs.img) file instead of to an
+installation source. Follows the same syntax as the repo option. If this parameter is provided,
+it takes precedence over all other methods of finding the install.img. Otherwise, Anaconda will attempt
+to find the install.img first on any existing CD, and then from the location given by repo.
+If only the stage2 option is given without repo, Anaconda will use whatever repos the installed
+system would have enabled by default for installation. For instance, an install of a Fedora release
+will attempt to use the Fedora mirrorlist given by /etc/yum.repos.d/fedora.repo from that release.
+
+noverifyssl
+Prevents Anaconda from verifying the ssl certificate for all HTTPS connections with an exception of the
+additional kickstart repos (where --noverifyssl can be set per repo).
+
+liveinst
+Run in live installation mode.
+
+resolution
+Run GUI installer in the resolution specified, "1024x768" for example.
+
+usefbx
+Use the framebuffer X driver instead of attempting to use a hardware-specific one.
+
+vnc
+Enable VNC-based installation, you will need to connect to the machine using a VNC client application.
+A VNC install implies that the installed system will boot up in runlevel 3 instead of to the graphical
+login screen. The VNC session will be shared. Consider setting a VNC password using the vncpassword
+option.
+
+vncconnect
+Once installation is up and running, connect to the VNC client named HOST, and optionally use port PORT.
+
+vncpassword
+Enable a password for the VNC connection. This will prevent someone from inadvertently connecting
+to the vnc-based installation. Requires the VNC option to be specified as well. If you have specified
+vncconnect the PASSWORD will not be used unless connection to host is not possible. Please note that
+the password needs to be 6 to 8 characters long (limitation of the VNC protocol).
+
+xdriver
+Use DRIVER as the X driver to use during installation as well as on the installed system.
+
+keymap
+Keyboard layout to use during installation and on the installed system. Valid KEYMAP values
+are those which can be used for the keyboard kickstart command.
+
+lang
+Language to use for the installation, LANG should be a language code which is valid to be used
+with the lang kickstart command
+
+loglevel
+Set the minimum level required for messages to be logged on a terminal (log files always
+contain messages of all levels). Values for LEVEL are "debug", "info", "warning", "error",
+"critical" and "lock" (the "lock" level has been added in F21 and is used for debugging YUM locking).
+The default value is "info".
+
+syslog
+Once installation is up and running, send log messages to the syslog process on HOST,
+and optionally, on TCP port PORT. Requires the remote syslog process to accept incoming
+connections.
+
+noselinux
+Disable SELinux usage on the installed system.
+
+selinux
+Enable SELinux usage in the installed system (default). Note that when used as a boot option,
+"selinux" and "inst.selinux" are not the same. The "selinux" option is picked up by both kernel
+and Anaconda, but "inst.selinux" is processed only by Anaconda. So when "selinux=0" is used,
+SELinux will be disabled both in the installation environment and in the installed system,
+but when "inst.selinux=0" is used SELinux will only be disabled in the installed system.
+Also note that while SELinux is running in the installation environment by default, it is
+running in the permissive mode so disabling it there does not make much sense.
+
+nompath
+Disable support for multipath devices. This is for systems on which a false-positive is encountered
+which erroneously identifies a normal block device as a multipath device. There is no other reason
+to use this option. Warning: Don't use nompath with actual multipath hardware! Using this to attempt
+to install to a single path of a multipath is ill-advised, and not supported.
+
+mpath
+Enable multipath support during the installation (default)
+
 nodmraid
 Disable dmraid usage during the installation.
 
-- 
1.9.3



More information about the anaconda-patches mailing list