[PATCH] Split kickstart arg handling

Brian C. Lane bcl at redhat.com
Mon Jul 14 18:44:15 UTC 2014


When inst.ks is used the Anaconda dracut module downloads it and
partially processes it, writing it to /run/install/ks.cfs so --ks
indicates a file at this location should be used.

When --kickstart <path> is used from the cmdline it means use that
kickstart file directly. No URL handling is done when this argument is
passed.
---
 anaconda                  | 4 +++-
 data/anaconda_options.txt | 6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/anaconda b/anaconda
index f25bfae..e9a9dfa 100755
--- a/anaconda
+++ b/anaconda
@@ -427,8 +427,10 @@ def parseArguments(argv=None, boot_cmdline=None):
     # Method of operation
     ap.add_argument("-d", "--debug", dest="debug", action="store_true",
                     default=False, help=help_parser.help_text("debug"))
-    ap.add_argument("--ks", "--kickstart", dest="ksfile", nargs="?",
+    ap.add_argument("--ks", dest="ksfile", action="store_const",
                     metavar="KICKSTART_URL", const="/run/install/ks.cfg",
+                    help=help_parser.help_text("ks"))
+    ap.add_argument("--kickstart", dest="ksfile", metavar="KICKSTART_PATH",
                     help=help_parser.help_text("kickstart"))
     ap.add_argument("--rescue", dest="rescue", action="store_true", default=False,
                     help=help_parser.help_text("rescue"))
diff --git a/data/anaconda_options.txt b/data/anaconda_options.txt
index 1944c0d..a1e3143 100644
--- a/data/anaconda_options.txt
+++ b/data/anaconda_options.txt
@@ -22,12 +22,16 @@ debug
 Show debug level messages in the log watching consoles.
 This basically a shortcut for for loglevel=debug.
 
-kickstart
+ks
 Gives the location of the kickstart file to be used for installation. The KICKSTART_URL
 supports fetching kickstarts from HTTP/S, FTP, NFS, from a local file, from a local
 harddrive, from an optical disk and from BIOS RAID sets. For details on the KICKSTART_URL
 syntax see the Anaconda options wiki page: http://fedoraproject.org/wiki/Anaconda_Boot_Options
 
+kickstart
+Gives the local file path to use for kickstart. Normally only used when running anaconda
+from the cmdline.
+
 rescue
 Start the rescue environment instead of installation.
 
-- 
1.9.3



More information about the anaconda-patches mailing list