summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-04-07 09:32:25 +0000
committerOlivier Blin <oblin@mandriva.org>2005-04-07 09:32:25 +0000
commitd0f8bce876c02231cc45e6dc05dfefe6475db7ff (patch)
treed48895e3ad868349a7aee79a71319448cafc0241
parent14251f0c8712a78252cada3660cf2898d6581fa6 (diff)
downloaddrakx-backup-do-not-use-d0f8bce876c02231cc45e6dc05dfefe6475db7ff.tar
drakx-backup-do-not-use-d0f8bce876c02231cc45e6dc05dfefe6475db7ff.tar.gz
drakx-backup-do-not-use-d0f8bce876c02231cc45e6dc05dfefe6475db7ff.tar.bz2
drakx-backup-do-not-use-d0f8bce876c02231cc45e6dc05dfefe6475db7ff.tar.xz
drakx-backup-do-not-use-d0f8bce876c02231cc45e6dc05dfefe6475db7ff.zip
export THIRDPARTY_DEVICE and THIRDPARTY_DIR for stage2
-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