From 434e6c62c1c8cb5ea57218a3e9fedc3bf08483d6 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 8 Jun 2004 18:49:38 +0000 Subject: in ftp install, check that modules for the boot kernel are available in mdkinst live location (they won't be used by the installer, but if they aren't here, they probably won't be in the mdkinst tarball) --- mdk-stage1/network.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c index 7cc30ff7f..aecedc54b 100644 --- a/mdk-stage1/network.c +++ b/mdk-stage1/network.c @@ -704,6 +704,8 @@ enum return_type ftp_prepare(void) char * questions_auto[] = { "server", "directory", "user", "pass", "proxy_host", "proxy_port", NULL }; static char ** answers = NULL; enum return_type results; + char modules_cz[500]; + struct utsname kernel_uname; if (!ramdisk_possible()) { stg1_error_message("FTP install needs more than %d Mbytes of memory (detected %d Mbytes). You may want to try an NFS install.", @@ -716,6 +718,8 @@ enum return_type ftp_prepare(void) if (results != RETURN_OK) return results; + uname(&kernel_uname); + do { char location_full[500]; int ftp_serv_response = -1; @@ -751,6 +755,17 @@ enum return_type ftp_prepare(void) results = RETURN_BACK; continue; } + + strcpy(modules_cz, answers[1]); + strcat(modules_cz, LIVE_LOCATION "lib/modules.cz-"); + strcat(modules_cz, kernel_uname.release); + + log_message("checking presence of modules.cz file : \"%s\"", modules_cz); + if (ftp_get_filesize(ftp_serv_response, modules_cz) <= 0) { + stg1_info_message("The modules for this kernel (%s) can't be found on this mirror, please update your boot disk", kernel_uname.release); + results = RETURN_BACK; + continue; + } } strcpy(location_full, answers[1]); -- cgit v1.2.1