summaryrefslogtreecommitdiffstats
path: root/loader2/kickstart.c
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-01-23 21:41:27 +0000
committerJeremy Katz <katzj@redhat.com>2003-01-23 21:41:27 +0000
commitfee16aca24c752715e6f67fd28ffd64907c38e8a (patch)
tree9060dd3fa69aa2d7fc1398a0732bbea582c0fa46 /loader2/kickstart.c
parentc9fa7f7ec292d892b05028c4c7cc0b4c40103f38 (diff)
downloadanaconda-fee16aca24c752715e6f67fd28ffd64907c38e8a.tar.gz
anaconda-fee16aca24c752715e6f67fd28ffd64907c38e8a.tar.xz
anaconda-fee16aca24c752715e6f67fd28ffd64907c38e8a.zip
add support for the ks=nfs:host/path/ ks=http://host/path/ syntax to resolve
to ip-kickstart. Also adds ftp kickstart file pulling. (#77320 at least... I think there are a few others on this)
Diffstat (limited to 'loader2/kickstart.c')
-rw-r--r--loader2/kickstart.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/loader2/kickstart.c b/loader2/kickstart.c
index 443b22ae0..4fc129674 100644
--- a/loader2/kickstart.c
+++ b/loader2/kickstart.c
@@ -294,6 +294,26 @@ int getKickstartFromBlockDevice(char *device, char *path) {
return rc;
}
+void getHostandPath(char * ksSource, char **host, char ** file, char * ip) {
+ *host = malloc(strlen(ksSource) + 1);
+ strcpy(*host, ksSource);
+
+ *file = strchr(*host, '/');
+
+ if (*file) {
+ **file = '\0';
+ *file = *file + 1;
+ } else {
+ *file = malloc(sizeof(char *));
+ **file = '\0';
+ }
+
+ if ((*file) && (((*file)[strlen(*file) - 1] == '/') ||
+ ((*file)[strlen(*file) - 1] == '\0'))) {
+ *file = sdupprintf("%s%s-kickstart", *file, ip);
+
+ }
+}
void getKickstartFile(struct knownDevices * kd,
struct loaderData_s * loaderData, int * flagsPtr) {