From fee16aca24c752715e6f67fd28ffd64907c38e8a Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Thu, 23 Jan 2003 21:41:27 +0000 Subject: 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) --- loader2/kickstart.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'loader2/kickstart.c') 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) { -- cgit