summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/disk.c
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/disk.c
parent42a8773fe0e728410692098f2a11652ef5752849 (diff)
downloaddrakx-38f7f8427f6300ccacb464a9d3b95e89d6f83ffc.tar
drakx-38f7f8427f6300ccacb464a9d3b95e89d6f83ffc.tar.gz
drakx-38f7f8427f6300ccacb464a9d3b95e89d6f83ffc.tar.bz2
drakx-38f7f8427f6300ccacb464a9d3b95e89d6f83ffc.tar.xz
drakx-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/disk.c')
-rw-r--r--mdk-stage1/disk.c71
1 files changed, 0 insertions, 71 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