diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-06-08 18:49:38 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-06-08 18:49:38 +0000 |
commit | 434e6c62c1c8cb5ea57218a3e9fedc3bf08483d6 (patch) | |
tree | b54bae5d4a4ae3167b077895bb97d4ed9b460a76 | |
parent | 71c841613becdf120bb4d5187829f3d4c807126d (diff) | |
download | drakx-434e6c62c1c8cb5ea57218a3e9fedc3bf08483d6.tar drakx-434e6c62c1c8cb5ea57218a3e9fedc3bf08483d6.tar.gz drakx-434e6c62c1c8cb5ea57218a3e9fedc3bf08483d6.tar.bz2 drakx-434e6c62c1c8cb5ea57218a3e9fedc3bf08483d6.tar.xz drakx-434e6c62c1c8cb5ea57218a3e9fedc3bf08483d6.zip |
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)
-rw-r--r-- | mdk-stage1/network.c | 15 |
1 files changed, 15 insertions, 0 deletions
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]); |