From 045e459c30fac235e500a71f139f012feb1ec1c9 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Wed, 2 Nov 1994 09:05:49 +0000 Subject: [PATCH] Stage0 can't dump you into a shell. There isn't one. Just reboot. Stage5 didn't have a large enough dialog box. Fix that. Also use Andrew's autosizing code. --- sbin/sysinstall/stage0.c | 23 +++++++++-------------- sbin/sysinstall/stage5.c | 4 ++-- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/sbin/sysinstall/stage0.c b/sbin/sysinstall/stage0.c index 58cef3166c01..e14c2291a168 100644 --- a/sbin/sysinstall/stage0.c +++ b/sbin/sysinstall/stage0.c @@ -33,12 +33,10 @@ static unsigned char *welcome[] = { "Proceed with installation.", "4. Fixit", "Repair existing installation (`fixit' mode).", - "5. Exit", - "Exit to shell.", + "5. Quit", + "Don't do anything, just reboot.", }; -void bailout(void); - void stage0() { @@ -46,7 +44,9 @@ evil_goto: if (dialog_menu("Welcome to FreeBSD!", "Please select one of the following options:", 15, 75, 6, 5, welcome, selection)) { - bailout(); + dialog_clear(); + end_dialog(); + reboot(RB_AUTOBOOT); } switch (atoi(selection)) { case 1: /* View readme */ @@ -77,15 +77,10 @@ evil_goto: break; case 5: - bailout(); + /* Be neat.. */ + dialog_clear(); + end_dialog(); + reboot(RB_AUTOBOOT); break; /* hope not! :) */ } } - -void -bailout() -{ - dialog_clear(); - end_dialog(); - exit(0); -} diff --git a/sbin/sysinstall/stage5.c b/sbin/sysinstall/stage5.c index e999b1db8ac4..e9011d26ac2b 100644 --- a/sbin/sysinstall/stage5.c +++ b/sbin/sysinstall/stage5.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: stage5.c,v 1.3 1994/10/29 10:01:37 phk Exp $ + * $Id: stage5.c,v 1.4 1994/11/02 06:19:50 jkh Exp $ * */ @@ -36,7 +36,7 @@ Thank you for your patience!"; void stage5() { - dialog_msgbox(TITLE, msg, 7, 75, 1); + dialog_msgbox(TITLE, msg, strheight(msg) + 4, strwidth(msg) + 4, 1); end_dialog(); dialog_active=0; setenv("PATH","/stand",1);