* make selection of 'none' for installation media type return the user
to the toplevel menu, as promised by the media selection menu, without first going through an "installation is aborted" menu. * when something causes the installation to fail (e.g. missing set or failure to extract a set's contents), don't go through N menus (missing/failed/aborted, sets didn't install/aborted, sanity check failed/aborted) before getting back to the top level. The user only needs to be told once that their life sucks.
This commit is contained in:
parent
f9227dd6ef
commit
3528b5e0cf
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: defs.h,v 1.44 1999/06/22 02:43:09 cgd Exp $ */
|
||||
/* $NetBSD: defs.h,v 1.45 1999/06/22 06:57:00 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -298,7 +298,7 @@ void toggle_getit __P((int));
|
|||
void show_cur_distsets __P((void));
|
||||
void make_ramdisk_dir __P((const char *path));
|
||||
void ask_verbose_dist __P((void));
|
||||
void get_and_unpack_sets(int success_msg, int failure_msg);
|
||||
int get_and_unpack_sets(int success_msg, int failure_msg);
|
||||
int sanity_check __P((void));
|
||||
|
||||
/* from target.c */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: install.c,v 1.18 1999/06/22 00:57:06 cgd Exp $ */
|
||||
/* $NetBSD: install.c,v 1.19 1999/06/22 06:57:00 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -122,7 +122,8 @@ do_install()
|
|||
wrefresh(stdscr);
|
||||
|
||||
/* Unpack the distribution. */
|
||||
get_and_unpack_sets(MSG_instcomplete, MSG_abortinst);
|
||||
if (get_and_unpack_sets(MSG_instcomplete, MSG_abortinst) != 0)
|
||||
return;
|
||||
|
||||
sanity_check();
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: upgrade.c,v 1.19 1999/06/22 00:57:06 cgd Exp $ */
|
||||
/* $NetBSD: upgrade.c,v 1.20 1999/06/22 06:57:01 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -101,7 +101,8 @@ do_upgrade()
|
|||
wclear(stdscr);
|
||||
wrefresh(stdscr);
|
||||
|
||||
get_and_unpack_sets(MSG_upgrcomplete, MSG_abortupgr);
|
||||
if (get_and_unpack_sets(MSG_upgrcomplete, MSG_abortupgr) != 0)
|
||||
return;
|
||||
|
||||
/* Copy back any files we should restore after the upgrade.*/
|
||||
merge_etc();
|
||||
|
@ -214,8 +215,8 @@ do_reinstall_sets()
|
|||
wrefresh(stdscr);
|
||||
|
||||
/* Unpack the distribution. */
|
||||
get_and_unpack_sets(MSG_unpackcomplete, MSG_abortunpack);
|
||||
if (get_and_unpack_sets(MSG_unpackcomplete, MSG_abortunpack) != 0)
|
||||
return;
|
||||
|
||||
sanity_check();
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: util.c,v 1.44 1999/06/22 02:43:10 cgd Exp $ */
|
||||
/* $NetBSD: util.c,v 1.45 1999/06/22 06:57:01 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -716,7 +716,7 @@ cleanup_dist(name)
|
|||
* show failure_msg and wait for the user to ack it before continuing.
|
||||
* success_msg and failure_msg must both be 0-adic messages.
|
||||
*/
|
||||
void
|
||||
int
|
||||
get_and_unpack_sets(success_msg, failure_msg)
|
||||
int success_msg;
|
||||
int failure_msg;
|
||||
|
@ -739,14 +739,13 @@ get_and_unpack_sets(success_msg, failure_msg)
|
|||
process_menu(MENU_distmedium);
|
||||
|
||||
if (nodist)
|
||||
return;
|
||||
return 1;
|
||||
|
||||
if (got_dist) {
|
||||
|
||||
/* Extract the distribution, abort on errors. */
|
||||
if (extract_dist()) {
|
||||
goto bad;
|
||||
}
|
||||
if (extract_dist())
|
||||
return 1;
|
||||
|
||||
/* Configure the system */
|
||||
run_makedev();
|
||||
|
@ -765,12 +764,12 @@ get_and_unpack_sets(success_msg, failure_msg)
|
|||
/* Install/Upgrade complete ... reboot or exit to script */
|
||||
msg_display(success_msg);
|
||||
process_menu(MENU_ok);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bad:
|
||||
msg_display(failure_msg);
|
||||
process_menu(MENU_ok);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue