summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdk-stage1/dhcp.c4
-rw-r--r--mdk-stage1/stage1.c5
-rw-r--r--mdk-stage1/stage1.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/mdk-stage1/dhcp.c b/mdk-stage1/dhcp.c
index 44877fd8a..ef7bd6a29 100644
--- a/mdk-stage1/dhcp.c
+++ b/mdk-stage1/dhcp.c
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <unistd.h>
+#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
@@ -207,6 +208,9 @@ static void parse_reply(struct bootp_request * breq, struct interface_info * int
unsigned char * chptr;
unsigned char option, length;
+ if (breq->bootfile && strlen(breq->bootfile) > 0)
+ stage2_kickstart = strdup(breq->bootfile);
+
memcpy(&intf->ip, &breq->yiaddr, 4);
chptr = breq->vendor;
diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c
index bcbf2c0e5..4370ebe1d 100644
--- a/mdk-stage1/stage1.c
+++ b/mdk-stage1/stage1.c
@@ -68,6 +68,7 @@
* globals */
char * method_name;
+char * stage2_kickstart = NULL;
void fatal_error(char *msg)
@@ -445,6 +446,10 @@ int main(int argc, char **argv, char **env)
}
if (disable_modules)
*argptr++ = "--blank";
+ if (stage2_kickstart) {
+ *argptr++ = "--kickstart";
+ *argptr++ = stage2_kickstart;
+ }
*argptr++ = NULL;
execve(stage2_args[0], stage2_args, grab_env());
diff --git a/mdk-stage1/stage1.h b/mdk-stage1/stage1.h
index 431e10600..f92c45c41 100644
--- a/mdk-stage1/stage1.h
+++ b/mdk-stage1/stage1.h
@@ -30,6 +30,7 @@
extern char * method_name;
extern char * interactive_fifo;
+extern char * stage2_kickstart;
#define MODE_TESTING (1 << 0)
#define MODE_EXPERT (1 << 1)