summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/dhcp.c2
-rw-r--r--mdk-stage1/stage1.h2
-rw-r--r--mdk-stage1/tools.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/mdk-stage1/dhcp.c b/mdk-stage1/dhcp.c
index bae74c9f4..06a225464 100644
--- a/mdk-stage1/dhcp.c
+++ b/mdk-stage1/dhcp.c
@@ -211,7 +211,7 @@ 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)
+ if (breq->bootfile && strlen(breq->bootfile) > 0 && IS_NETAUTO)
stage2_kickstart = strdup(breq->bootfile);
memcpy(&intf->ip, &breq->yiaddr, 4);
diff --git a/mdk-stage1/stage1.h b/mdk-stage1/stage1.h
index 8b26fd947..d32543309 100644
--- a/mdk-stage1/stage1.h
+++ b/mdk-stage1/stage1.h
@@ -41,6 +41,7 @@ extern char * stage2_kickstart;
#define MODE_CHANGEDISK (1 << 10)
#define MODE_UPDATEMODULES (1 << 11)
#define MODE_NOAUTO (1 << 12)
+#define MODE_NETAUTO (1 << 13)
#define IS_TESTING (get_param(MODE_TESTING))
#define IS_EXPERT (get_param(MODE_EXPERT))
@@ -51,6 +52,7 @@ extern char * stage2_kickstart;
#define IS_CHANGEDISK (get_param(MODE_CHANGEDISK))
#define IS_UPDATEMODULES (get_param(MODE_UPDATEMODULES))
#define IS_NOAUTO (get_param(MODE_NOAUTO))
+#define IS_NETAUTO (get_param(MODE_NETAUTO))
void fatal_error(char *msg) __attribute__ ((noreturn));
diff --git a/mdk-stage1/tools.c b/mdk-stage1/tools.c
index a921883a8..fd2e556b8 100644
--- a/mdk-stage1/tools.c
+++ b/mdk-stage1/tools.c
@@ -91,6 +91,7 @@ void process_cmdline(void)
if (!strcmp(name, "updatemodules")) set_param(MODE_UPDATEMODULES);
if (!strcmp(name, "rescue")) set_param(MODE_RESCUE);
if (!strcmp(name, "noauto")) set_param(MODE_NOAUTO);
+ if (!strcmp(name, "netauto")) set_param(MODE_NETAUTO);
if (!strcmp(name, "special_stage2")) set_param(MODE_SPECIAL_STAGE2);
if (!strcmp(name, "automatic")) {
set_param(MODE_AUTOMATIC);