Second round of screen update changes. Now handle the yes/no dialogs

as well as the confirmation dialogs.
This commit is contained in:
jkh 1995-10-22 17:39:29 +00:00
parent 212c8f1ba7
commit adc8dfe933
5 changed files with 16 additions and 4 deletions

View File

@ -47,6 +47,7 @@ docBrowser(char *junk)
return RET_FAIL;
}
if (!file_executable(variable_get(VAR_BROWSER_BINARY))) {
dialog_clear();
if (!msgYesNo("Hmmm. The %s package claims to have installed, but I can't\n"
"find its binary in %s! You may wish to try a different\n"
"location to load the package from (go to Media menu) and see if that\n"

View File

@ -148,6 +148,7 @@ installPreconfig(char *str)
if (mount(MOUNT_UFS, "/mnt2", MNT_RDONLY, (caddr_t)&u_args) == -1) {
if (mount(MOUNT_MSDOS, "/mnt2", MNT_RDONLY, (caddr_t)&m_args) == -1) {
dialog_clear();
if (msgYesNo("Unable to mount the configuration floppy - do you want to try again?"))
break;
else
@ -161,8 +162,9 @@ installPreconfig(char *str)
msgDebug("Attempting to open configuration file: %s\n", buf);
fd = open(buf, O_RDONLY);
if (fd == -1) {
if (msgYesNo("Unable to find the configuration file `%s' - do you want to\n"
"try again?", buf)) {
dialog_clear();
if (msgYesNo("Unable to find the configuration file: %s\n"
"Do you want to try again?", buf)) {
unmount("/mnt2", 0);
break;
}

View File

@ -197,6 +197,7 @@ installUpgrade(char *str)
/* No bin selected? Not much of an upgrade.. */
if (!(Dists & DIST_BIN)) {
dialog_clear();
if (msgYesNo("You didn't select the bin distribution as one of the distributons to load.\n"
"This one is pretty vital to a successful 2.1 upgrade. Are you SURE you don't\n"
"want to select the bin distribution? Chose _No_ to bring up the Distributions\n"
@ -257,6 +258,7 @@ installUpgrade(char *str)
while (!saved_etc) {
saved_etc = msgGetInput("/usr/tmp/etc", "Under which directory do you wish to save your current /etc?");
if (!saved_etc || !*saved_etc || Mkdir(saved_etc, NULL)) {
dialog_clear();
if (msgYesNo("Directory was not specified, was invalid or user selected Cancel.\n\n"
"Doing an upgrade without first backing up your /etc directory is a very\n"
"bad idea! Do you want to go back and specify the save directory again?"))
@ -271,10 +273,12 @@ installUpgrade(char *str)
}
if (file_readable("/kernel")) {
msgNotify("Moving old kernel to /kernel.205");
if (system("chflags noschg /mnt/kernel && mv /mnt/kernel /mnt/kernel.205"))
if (system("chflags noschg /mnt/kernel && mv /mnt/kernel /mnt/kernel.205")) {
dialog_clear();
if (!msgYesNo("Hmmm! I couldn't move the old kernel over! Do you want to\n"
"treat this as a big problem and abort the upgrade?"))
return RET_FAIL;
}
}
}
msgNotify("Beginning extraction of distributions..");

View File

@ -47,6 +47,7 @@ docBrowser(char *junk)
return RET_FAIL;
}
if (!file_executable(variable_get(VAR_BROWSER_BINARY))) {
dialog_clear();
if (!msgYesNo("Hmmm. The %s package claims to have installed, but I can't\n"
"find its binary in %s! You may wish to try a different\n"
"location to load the package from (go to Media menu) and see if that\n"

View File

@ -197,6 +197,7 @@ installUpgrade(char *str)
/* No bin selected? Not much of an upgrade.. */
if (!(Dists & DIST_BIN)) {
dialog_clear();
if (msgYesNo("You didn't select the bin distribution as one of the distributons to load.\n"
"This one is pretty vital to a successful 2.1 upgrade. Are you SURE you don't\n"
"want to select the bin distribution? Chose _No_ to bring up the Distributions\n"
@ -257,6 +258,7 @@ installUpgrade(char *str)
while (!saved_etc) {
saved_etc = msgGetInput("/usr/tmp/etc", "Under which directory do you wish to save your current /etc?");
if (!saved_etc || !*saved_etc || Mkdir(saved_etc, NULL)) {
dialog_clear();
if (msgYesNo("Directory was not specified, was invalid or user selected Cancel.\n\n"
"Doing an upgrade without first backing up your /etc directory is a very\n"
"bad idea! Do you want to go back and specify the save directory again?"))
@ -271,10 +273,12 @@ installUpgrade(char *str)
}
if (file_readable("/kernel")) {
msgNotify("Moving old kernel to /kernel.205");
if (system("chflags noschg /mnt/kernel && mv /mnt/kernel /mnt/kernel.205"))
if (system("chflags noschg /mnt/kernel && mv /mnt/kernel /mnt/kernel.205")) {
dialog_clear();
if (!msgYesNo("Hmmm! I couldn't move the old kernel over! Do you want to\n"
"treat this as a big problem and abort the upgrade?"))
return RET_FAIL;
}
}
}
msgNotify("Beginning extraction of distributions..");