From c65b2674cbdbf3552d697babbdd5e6ab7c2e5415 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Sat, 29 Jun 2019 14:25:21 +0800 Subject: [PATCH] support to get kickstart from network We support http/https/ftp protocol to get kickstart file Upstream-Status: Inappropriate [oe specific] Signed-off-by: Hongxu Jia Update for anaconda 32. Signed-off-by: Kai Kang Rebase for anaconda 38 on 20231107. Signed-off-by: Kai Kang --- pyanaconda/startup_utils.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pyanaconda/startup_utils.py b/pyanaconda/startup_utils.py index 07afd098ec..608dc84a6e 100644 --- a/pyanaconda/startup_utils.py +++ b/pyanaconda/startup_utils.py @@ -373,8 +373,11 @@ def find_kickstart(options): :param options: command line/boot options :returns: a path to a kickstart file or None """ - if options.ksfile and not options.liveinst: - if not os.path.exists(options.ksfile): + if options.ksfile: + if not os.path.exists(options.ksfile) and \ + not options.ksfile.startswith("http://") and \ + not options.ksfile.startswith("https://") and \ + not options.ksfile.startswith("ftp://"): stdout_log.error("Kickstart file %s is missing.", options.ksfile) ipmi_report(IPMI_ABORTED) sys.exit(1) @@ -391,8 +394,12 @@ def find_kickstart(options): else: ks_files = ["/usr/share/anaconda/interactive-defaults.ks"] + log.info("ks_files: %s" % ks_files) for ks in ks_files: - if not os.path.exists(ks): + if not os.path.exists(ks) and \ + not ks.startswith("http://") and \ + not ks.startswith("https://") and \ + not ks.startswith("ftp://"): continue return ks