summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorRebecca Cran <brucec@FreeBSD.org>2010-08-07 12:54:12 +0000
committerRebecca Cran <brucec@FreeBSD.org>2010-08-07 12:54:12 +0000
commit8555b5a97b04581f4993ee86357ca860a63f1ea3 (patch)
treef39d71dc65b65a7f231645e4700c50e9aa45580c /usr.sbin
parent255aafdd3a2a38024c6e9125f38b51e05d7c861d (diff)
Notes
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sysinstall/dist.c22
-rw-r--r--usr.sbin/sysinstall/install.c6
2 files changed, 19 insertions, 9 deletions
diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c
index 8e6c22954417d..3cfef154c8543 100644
--- a/usr.sbin/sysinstall/dist.c
+++ b/usr.sbin/sysinstall/dist.c
@@ -629,7 +629,7 @@ getinfo:
if (fp == NULL)
msgConfirm("Failed to find %s on this media. Reinitializing media.", fname);
else
- msgConfirm("Failed to retreive piece file %s.\n"
+ msgConfirm("Failed to retrieve piece file %s.\n"
"%s: Reinitializing media.",
fname, !intr ? "I/O error" : "User interrupt");
DEVICE_SHUTDOWN(mediaDevice);
@@ -725,6 +725,7 @@ distExtract(char *parent, Distribution *me)
char *path, *dist;
WINDOW *w = savescr();
struct sigaction old, new;
+ int canceled = 0;
status = TRUE;
if (isDebug())
@@ -739,7 +740,7 @@ distExtract(char *parent, Distribution *me)
sigaction(SIGINT, &new, &old);
/* Loop through to see if we're in our parent's plans */
- for (i = 0; me[i].my_name; i++) {
+ for (i = 0; me[i].my_name && canceled == 0; i++) {
dist = me[i].my_name;
path = parent ? parent : dist;
@@ -774,8 +775,11 @@ distExtract(char *parent, Distribution *me)
status = msgYesNo("Unable to transfer the %s distribution from\n%s.\n\n"
"Do you want to try to retrieve it again?",
me[i].my_name, mediaDevice->name);
- if (!status)
+ if (status == 0)
--i;
+ else
+ canceled = 1;
+
status = FALSE;
}
}
@@ -789,6 +793,7 @@ distExtract(char *parent, Distribution *me)
if (status)
*(me[i].my_mask) &= ~(me[i].my_bit);
}
+
sigaction(SIGINT, &old, NULL); /* Restore signal handler */
restorescr(w);
return status;
@@ -822,8 +827,9 @@ printSelected(char *buf, int selected, Distribution *me, int *col)
int
distExtractAll(dialogMenuItem *self)
{
- int old_dists, old_kernel, retries = 0, status = DITEM_SUCCESS;
+ int old_dists, old_kernel, status = DITEM_SUCCESS;
char buf[512];
+ int extract_status = TRUE;
WINDOW *w;
/* paranoia */
@@ -843,9 +849,7 @@ distExtractAll(dialogMenuItem *self)
w = savescr();
msgNotify("Attempting to install all selected distributions..");
- /* Try for 3 times around the loop, then give up. */
- while (Dists && ++retries < 3)
- distExtract(NULL, DistTable);
+ extract_status = distExtract(NULL, DistTable);
dialog_clear_norefresh();
/* Only do base fixup if base dist was successfully extracted */
@@ -872,5 +876,9 @@ distExtractAll(dialogMenuItem *self)
}
}
restorescr(w);
+
+ if (extract_status == FALSE)
+ status = DITEM_FAILURE;
+
return status;
}
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 94f76ffbc4aa6..36af813905379 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -628,8 +628,7 @@ nodisks:
msgConfirm("Installation completed with some errors. You may wish to\n"
"scroll through the debugging messages on VTY1 with the\n"
"scroll-lock feature. You can also choose \"No\" at the next\n"
- "prompt and go back into the installation menus to retry\n"
- "whichever operations have failed.");
+ "prompt and reboot and try the installation again.");
return i;
}
@@ -817,6 +816,9 @@ try_media:
/* Now go get it all */
i = distExtractAll(self);
+ if (i == FALSE)
+ return FALSE;
+
/* When running as init, *now* it's safe to grab the rc.foo vars */
installEnvironment();