summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-11-29 17:53:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-11-29 17:53:54 +0000
commit38f7f8427f6300ccacb464a9d3b95e89d6f83ffc (patch)
tree4bb5bf77bbe6128d4b458b30a277d655e6bf2e2b /mdk-stage1
parent42a8773fe0e728410692098f2a11652ef5752849 (diff)
downloaddrakx-backup-do-not-use-38f7f8427f6300ccacb464a9d3b95e89d6f83ffc.tar
drakx-backup-do-not-use-38f7f8427f6300ccacb464a9d3b95e89d6f83ffc.tar.gz
drakx-backup-do-not-use-38f7f8427f6300ccacb464a9d3b95e89d6f83ffc.tar.bz2
drakx-backup-do-not-use-38f7f8427f6300ccacb464a9d3b95e89d6f83ffc.tar.xz
drakx-backup-do-not-use-38f7f8427f6300ccacb464a9d3b95e89d6f83ffc.zip
- drop oem & recovery code (which was broken)
- will be replaced with a root password + user accounts + network configuration a la drakfirsttime
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/disk.c71
-rw-r--r--mdk-stage1/disk.h3
-rw-r--r--mdk-stage1/stage1.c9
-rw-r--r--mdk-stage1/tools.c1
4 files changed, 1 insertions, 83 deletions
diff --git a/mdk-stage1/disk.c b/mdk-stage1/disk.c
index 1060cd199..8318bb6f4 100644
--- a/mdk-stage1/disk.c
+++ b/mdk-stage1/disk.c
@@ -315,74 +315,3 @@ enum return_type disk_prepare(void)
return RETURN_BACK;
return disk_prepare();
}
-
-#ifndef MANDRAKE_MOVE
-int
-process_recovery(void)
-{
- char ** medias, ** medias_models;
- int count, i;
-
- log_message("trying the automatic recovery of oem installs");
-
- count = get_disks(&medias, &medias_models);
-
- for (i=0; i<count; i++) {
- char * parts[50];
- char * parts_comments[50];
- char ** part, ** comment;
- log_message("examining disk %s (%s)", medias[i], medias_models[i]);
-
- if (list_partitions(medias[i], parts, parts_comments)) {
- log_message("could not read partitions information, bailing out");
- return 0;
- }
-
- part = parts;
- comment = parts_comments;
- while (part && *part) {
- char * disk_own_mount = "/tmp/hdimage";
- log_message("examining partition %s (%s)", *part, *comment);
- if (try_mount(*part, disk_own_mount))
- log_message("couldn't mount it");
- else {
- FILE *f;
- char buf[500];
- char location[500];
- strcpy(location, disk_own_mount);
- strcat(location, "/VERSION");
- if (!(f = fopen(location, "rb")) || !fgets(buf, sizeof(buf), f)) {
- log_perror("could not fopen or fgets VERSION");
- goto examine_next_part;
- }
- fclose(f);
- if (!strstr(buf, VERSION)) {
- log_message("mismatching VERSION contents");
- goto examine_next_part;
- }
- strcpy(location, disk_own_mount);
- strcat(location, "/install/stage2");
- if (access(location, R_OK)) {
- log_message("install/stage2 is not here");
- goto examine_next_part;
- }
-
- log_message("going on with a recovery on disk %s partition %s", medias[i], *part);
-
- symlink(disk_own_mount, IMAGE_LOCATION);
- may_load_clp(); /* no error check */
-
- add_to_env("METHOD", "disk");
- return 1;
- }
-
- examine_next_part:
- umount(disk_own_mount);
- part++;
- comment++;
- }
- }
-
- return 0;
-}
-#endif
diff --git a/mdk-stage1/disk.h b/mdk-stage1/disk.h
index 91cfbb2fd..fae890894 100644
--- a/mdk-stage1/disk.h
+++ b/mdk-stage1/disk.h
@@ -23,8 +23,5 @@
#define _DISK_H_
enum return_type disk_prepare(void);
-#ifndef MANDRAKE_MOVE
-int process_recovery(void);
-#endif
#endif
diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c
index c25e3d68f..9768bce56 100644
--- a/mdk-stage1/stage1.c
+++ b/mdk-stage1/stage1.c
@@ -640,15 +640,8 @@ int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))
if (total_memory() < MEM_LIMIT_MOVE)
stg1_info_message(DISTRIB_NAME " typically needs more than %d Mbytes of memory (detected %d Mbytes). You may proceed, but the machine may crash or lock up for no apparent reason. Continue at your own risk. Alternatively, you may reboot your system now.",
MEM_LIMIT_MOVE, total_memory());
-#else
-#ifndef DISABLE_DISK
- if (IS_RECOVERY && streq(get_auto_value("method"), "cdrom")) {
- if (!process_recovery())
- method_select_and_prepare();
- } else
-#endif
#endif
- method_select_and_prepare();
+ method_select_and_prepare();
#ifndef MANDRAKE_MOVE
if (access(STAGE2_LOCATION, R_OK) != 0)
diff --git a/mdk-stage1/tools.c b/mdk-stage1/tools.c
index be1043798..45cafcfad 100644
--- a/mdk-stage1/tools.c
+++ b/mdk-stage1/tools.c
@@ -107,7 +107,6 @@ void process_cmdline(void)
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, "recovery")) set_param(MODE_RECOVERY);
if (!strcmp(name, "debugstage1")) set_param(MODE_DEBUGSTAGE1);
if (!strcmp(name, "automatic")) {
set_param(MODE_AUTOMATIC);