summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-08-28 14:36:54 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-08-28 14:36:54 +0000
commit8584153227c6e4caf9d0185eaa790d62a4754455 (patch)
tree2c6ac143a3878f9b06a7ffd0398ece3ee547063c /perl-install/partition_table.pm
parentffd0b578f607c50f0c995c352282bf8906017b19 (diff)
downloaddrakx-8584153227c6e4caf9d0185eaa790d62a4754455.tar
drakx-8584153227c6e4caf9d0185eaa790d62a4754455.tar.gz
drakx-8584153227c6e4caf9d0185eaa790d62a4754455.tar.bz2
drakx-8584153227c6e4caf9d0185eaa790d62a4754455.tar.xz
drakx-8584153227c6e4caf9d0185eaa790d62a4754455.zip
no_comment
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 5d7cbd890..2f86e969a 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -401,7 +401,7 @@ The only solution is to move your primary partitions to have the hole next to th
}
sub add($$;$) {
- my ($hd, $part, $want_primary) = @_;
+ my ($hd, $part, $primaryOrExtended) = @_;
$part->{notFormatted} = 1;
$part->{isFormatted} = 0;
@@ -412,7 +412,8 @@ sub add($$;$) {
my $e = $hd->{primary}{extended};
- if (is_empty_array_ref($hd->{primary}{normal}) || $want_primary) {
+ if ($primaryOrExtended eq 'Primary' ||
+ $primaryOrExtended ne 'Extended' && is_empty_array_ref($hd->{primary}{normal})) {
eval { add_primary($hd, $part) };
return unless $@;
}
"That CDROM disc does not seem to be a " DISTRIB_NAME " Installation CDROM.\nRetry with another disc?");
@@ -77,6 +74,27 @@ static enum return_type try_with_device(char *dev_name, char * dev_model)
method_name = strdup("cdrom");
return RETURN_OK;
+}
+
+static enum return_type try_with_device(char * dev_name, char * dev_model)
+{
+ wait_message("Trying to access a CDROM disc (drive %s)", dev_model);
+
+ if (mount_that_cd_device(dev_name) == -1) {
+ enum return_type results;
+ char msg[500];
+ unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */
+ remove_wait_message();
+
+ snprintf(msg, sizeof(msg), "I can't access a " DISTRIB_NAME " Installation disc in your CDROM drive (%s).\nRetry?", dev_model);
+ results = ask_yes_no(msg);
+ if (results == RETURN_OK)
+ return try_with_device(dev_name, dev_model);
+ return results;
+ }
+ remove_wait_message();
+
+ return do_with_device(dev_name, dev_model);
}
enum return_type cdrom_prepare(void)
@@ -116,10 +134,24 @@ enum return_type cdrom_prepare(void)
}
if (IS_AUTOMATIC) {
- results = try_with_device(*medias, *medias_models);
- if (results != RETURN_OK)
- unset_param(MODE_AUTOMATIC);
- return results;
+ char ** model = medias_models;
+ ptr = medias;
+ while (ptr && *ptr) {
+ wait_message("Trying to access " DISTRIB_NAME " CDROM disc (drive %s)", *model);
+ if (mount_that_cd_device(*ptr) != -1) {
+ if (!test_that_cd()) {
+ remove_wait_message();
+ return do_with_device(*ptr, *model);
+ }
+ else
+ umount(IMAGE_LOCATION);
+ }
+ remove_wait_message();
+ ptr++;
+ model++;
+ }
+ unset_param(MODE_AUTOMATIC);
+ return cdrom_prepare();
}
else {
results = ask_from_list_comments("Please choose the CDROM drive to use for the installation.", medias, medias_models, &choice);