blob: de19003a6ad6ff03bd1db2ecd5eb8c03c0a163e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
From c65b2674cbdbf3552d697babbdd5e6ab7c2e5415 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
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 <hongxu.jia@windriver.com>
Update for anaconda 32.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Rebase for anaconda 38 on 20231107.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
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
|