diff options
author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1997-01-15 06:30:50 +0000 |
---|---|---|
committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1997-01-15 06:30:50 +0000 |
commit | 4a57e2940f6e45bcbca4d8ea8500403ca8aa4e7b (patch) | |
tree | 29e7b8dbd6d713f6ae21cbd62c9ecfa9c1abbf3e /release/sysinstall/dist.c | |
parent | 019f13780eee3334f3f2fd67547c2f85e9c6f7a0 (diff) | |
download | src-4a57e2940f6e45bcbca4d8ea8500403ca8aa4e7b.tar.gz src-4a57e2940f6e45bcbca4d8ea8500403ca8aa4e7b.zip |
Make the FTP installation codepath a lot more defensive. Trap
bogus path and FTP I/O errors much earlier, offer retry possibilities
at steps along the way so you don't have to resume from the very beginning
again on a hard error.
Notes
Notes:
svn path=/head/; revision=21710
Diffstat (limited to 'release/sysinstall/dist.c')
-rw-r--r-- | release/sysinstall/dist.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/release/sysinstall/dist.c b/release/sysinstall/dist.c index c2f69fe3b1f3..c8455f727ff8 100644 --- a/release/sysinstall/dist.c +++ b/release/sysinstall/dist.c @@ -567,16 +567,10 @@ distExtractAll(dialogMenuItem *self) int retries = 0; char buf[512]; - /* First try to initialize the state of things */ - if (!Dists) { - msgConfirm("You haven't selected any distributions to extract."); - return DITEM_FAILURE; - } - if (!mediaVerify()) + /* paranoia */ + if (!Dists || !mediaVerify() || !mediaDevice->init(mediaDevice)) return DITEM_FAILURE; - if (!mediaDevice->init(mediaDevice)) - return DITEM_FAILURE; dialog_clear_norefresh(); msgNotify("Attempting to install all selected distributions.."); /* Try for 3 times around the loop, then give up. */ @@ -592,7 +586,7 @@ distExtractAll(dialogMenuItem *self) msgConfirm("Couldn't extract the following distributions. This may\n" "be because they were not available on the installation\n" "media you've chosen:\n\n\t%s", buf); - return DITEM_FAILURE | DITEM_RESTORE; + return DITEM_SUCCESS | DITEM_RESTORE; } return DITEM_SUCCESS; } |