summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdk-stage1/thirdparty.c9
-rw-r--r--mdk-stage1/thirdparty.h2
2 files changed, 9 insertions, 2 deletions
diff --git a/mdk-stage1/thirdparty.c b/mdk-stage1/thirdparty.c
index 1c8942d3c..e3a90a047 100644
--- a/mdk-stage1/thirdparty.c
+++ b/mdk-stage1/thirdparty.c
@@ -31,7 +31,6 @@
#include "thirdparty.h"
#define THIRDPARTY_MOUNT_LOCATION "/tmp/thirdparty"
-#define THIRDPARTY_DIRECTORY "/install/thirdparty"
static enum return_type thirdparty_choose_device(char ** device, int probe_only)
{
@@ -275,7 +274,12 @@ static enum return_type thirdparty_try_directory(char * root_directory, int inte
if (!modules_list || !modules_list[0]) {
modules_location[strlen(root_directory)] = '\0';
modules_list = list_directory(modules_location);
- }
+ if (interactive)
+ add_to_env("THIRDPARTY_DIR", "");
+ } else {
+ if (interactive)
+ add_to_env("THIRDPARTY_DIR", THIRDPARTY_DIRECTORY);
+ }
log_message("third party: using modules location %s", modules_location);
@@ -340,6 +344,7 @@ void thirdparty_load_modules(void)
}
log_message("third party: using device %s", device);
+ add_to_env("THIRDPARTY_DEVICE", device);
results = thirdparty_try_directory(THIRDPARTY_MOUNT_LOCATION, 1);
umount(THIRDPARTY_MOUNT_LOCATION);
diff --git a/mdk-stage1/thirdparty.h b/mdk-stage1/thirdparty.h
index b88db7e0e..23066374c 100644
--- a/mdk-stage1/thirdparty.h
+++ b/mdk-stage1/thirdparty.h
@@ -16,6 +16,8 @@
#ifndef _THIRDPARTY_H_
#define _THIRDPARTY_H_
+#define THIRDPARTY_DIRECTORY "/install/thirdparty"
+
/* load third party modules present on install media
* use to_load and to_detect files in /install/thirdparty
* do not prompt user