diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-11-04 12:08:06 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-11-04 12:08:06 +0000 |
commit | ef052622fc841e966bb8953b92f6397aae0cffd2 (patch) | |
tree | 7ba39c7d568892aa4d9817516ac60c008f22d0c5 | |
parent | 4e5c98b81e00478f560fed1ae4ac4de6b5cc272d (diff) | |
download | drakx-ef052622fc841e966bb8953b92f6397aae0cffd2.tar drakx-ef052622fc841e966bb8953b92f6397aae0cffd2.tar.gz drakx-ef052622fc841e966bb8953b92f6397aae0cffd2.tar.bz2 drakx-ef052622fc841e966bb8953b92f6397aae0cffd2.tar.xz drakx-ef052622fc841e966bb8953b92f6397aae0cffd2.zip |
use image_has_stage2() (even if not equivalent for rescue since we now check the stage2 stuff instead, but it should do)
-rw-r--r-- | mdk-stage1/directory.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/mdk-stage1/directory.c b/mdk-stage1/directory.c index 6a5bc96f9..9faa5e1dc 100644 --- a/mdk-stage1/directory.c +++ b/mdk-stage1/directory.c @@ -62,7 +62,7 @@ enum return_type try_with_directory(char *directory, char *method_live, char *me log_message("\"%s\" exists and is a directory, looking for iso files", directory); for (file = list_directory(directory); *file; file++) { - char isofile[500], install_location[600]; + char isofile[500]; if (strstr(*file, ".iso") != *file + strlen(*file) - 4) /* file doesn't end in .iso, skipping */ @@ -77,18 +77,11 @@ enum return_type try_with_directory(char *directory, char *method_live, char *me continue; } - strcpy(install_location, IMAGE_LOCATION); - - if (IS_RESCUE || ramdisk_possible()) - strcat(install_location, get_ramdisk_realname()); /* RAMDISK install */ - else - strcat(install_location, LIVE_LOCATION); /* LIVE install */ - - if (access(install_location, R_OK)) { - log_message("ISO image \"%s\" doesn't contain stage2 installer", isofile); - } else { + if (image_has_stage2()) { log_message("stage2 installer found in ISO image \"%s\"", isofile); stage2_isos[stage2_iso_number++] = strdup(*file); + } else { + log_message("ISO image \"%s\" doesn't contain stage2 installer", isofile); } umount(IMAGE_LOCATION); |