diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2004-02-18 09:58:16 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2004-02-18 09:58:16 +0000 |
commit | 04e6b93752bbf279193dce8251ad2ecca24fa7a6 (patch) | |
tree | 1dbfd1c967e572d659310e3724f6a19274809cc4 /mdk-stage1 | |
parent | 5c8be581c94702bfeb3423e546dcec2750988c59 (diff) | |
download | drakx-backup-do-not-use-04e6b93752bbf279193dce8251ad2ecca24fa7a6.tar drakx-backup-do-not-use-04e6b93752bbf279193dce8251ad2ecca24fa7a6.tar.gz drakx-backup-do-not-use-04e6b93752bbf279193dce8251ad2ecca24fa7a6.tar.bz2 drakx-backup-do-not-use-04e6b93752bbf279193dce8251ad2ecca24fa7a6.tar.xz drakx-backup-do-not-use-04e6b93752bbf279193dce8251ad2ecca24fa7a6.zip |
support automatic installs even when needing the additional drivers floppy
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/modules.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mdk-stage1/modules.c b/mdk-stage1/modules.c index 9df49aa46..efabb6e06 100644 --- a/mdk-stage1/modules.c +++ b/mdk-stage1/modules.c @@ -94,6 +94,7 @@ static enum return_type ensure_additional_modules_available(void) char floppy_mount_location[] = "/tmp/floppy"; char floppy_modules_mar[] = "/tmp/floppy/modules.mar"; int ret; + int automatic = 0; if (stat("/tmp/tmpfs", &statbuf)) { if (scall(mkdir("/tmp/tmpfs", 0755), "mkdir")) @@ -101,7 +102,12 @@ static enum return_type ensure_additional_modules_available(void) if (scall(mount("none", "/tmp/tmpfs", "tmpfs", MS_MGC_VAL, NULL), "mount tmpfs")) return RETURN_ERROR; } - + + if (IS_AUTOMATIC) { + unset_param(MODE_AUTOMATIC); + automatic = 1; + } + retry: stg1_info_message("Please insert the Additional Drivers floppy.");; @@ -113,6 +119,8 @@ static enum return_type ensure_additional_modules_available(void) : "Can't find a linux ext2 floppy in first floppy drive.\nRetry?"); if (results != RETURN_OK) { allow_additional_modules_floppy = 0; + if (automatic) + set_param(MODE_AUTOMATIC); return results; } } @@ -127,6 +135,8 @@ static enum return_type ensure_additional_modules_available(void) ret = copy_file(floppy_modules_mar, additional_archive_name, update_progression); end_progression(); umount(floppy_mount_location); + if (automatic) + set_param(MODE_AUTOMATIC); return ret; } else return RETURN_OK; @@ -172,7 +182,7 @@ static enum insmod_return insmod_archived_file(const char * mod_name, char * opt i = mar_extract_file(archive_name, module_name, "/tmp/"); if (i == 1) { static int recurse = 0; - if (allow_additional_modules_floppy && allow_modules_floppy && !recurse && !IS_AUTOMATIC) { + if (allow_additional_modules_floppy && allow_modules_floppy && !recurse) { recurse = 1; if (ensure_additional_modules_available() == RETURN_OK) i = mar_extract_file(additional_archive_name, module_name, "/tmp/"); |