1994-10-20 02:51:55 +00:00
|
|
|
/*
|
1994-10-28 15:19:57 +00:00
|
|
|
* Copyright (c) 1994, Jordan Hubbard, Paul Richards and Poul-Henning Kamp.
|
1994-10-20 02:51:55 +00:00
|
|
|
*
|
1994-10-28 15:19:57 +00:00
|
|
|
* All rights reserved.
|
1994-10-20 02:51:55 +00:00
|
|
|
*
|
1994-10-28 15:19:57 +00:00
|
|
|
* This software may be used, modified, copied, distributed, and
|
|
|
|
* sold, in both source and binary form provided that the above
|
|
|
|
* copyright and these terms are retained, verbatim, as the first
|
|
|
|
* lines of this file. Under no circumstances is the author
|
|
|
|
* responsible for the proper functioning of this software, nor does
|
|
|
|
* the author assume any responsibility for damages incurred with
|
|
|
|
* its use.
|
|
|
|
*
|
|
|
|
* [Note: This file bears almost no resemblance to what was here in an
|
|
|
|
* earlier incarnation].
|
1994-10-20 02:51:55 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
1994-11-02 11:00:35 +00:00
|
|
|
#include <sys/reboot.h>
|
1994-10-20 02:51:55 +00:00
|
|
|
#include <dialog.h>
|
|
|
|
|
|
|
|
#include "sysinstall.h"
|
|
|
|
|
1994-11-02 06:19:53 +00:00
|
|
|
static unsigned char *welcome[] = {
|
|
|
|
"1. README",
|
|
|
|
"View `READ ME FIRST' File.",
|
|
|
|
"2. COPYRIGHT",
|
1994-10-28 15:19:57 +00:00
|
|
|
"View FreeBSD Copyright Information.",
|
1994-11-02 06:19:53 +00:00
|
|
|
"3. Proceed",
|
1994-10-28 15:19:57 +00:00
|
|
|
"Proceed with installation.",
|
1994-11-02 06:19:53 +00:00
|
|
|
"4. Fixit",
|
|
|
|
"Repair existing installation (`fixit' mode).",
|
1994-11-02 09:05:49 +00:00
|
|
|
"5. Quit",
|
|
|
|
"Don't do anything, just reboot.",
|
1994-10-28 15:19:57 +00:00
|
|
|
};
|
|
|
|
|
1994-10-29 10:01:40 +00:00
|
|
|
void
|
|
|
|
stage0()
|
1994-10-20 02:51:55 +00:00
|
|
|
{
|
1994-11-02 06:19:53 +00:00
|
|
|
evil_goto:
|
|
|
|
if (dialog_menu("Welcome to FreeBSD!",
|
|
|
|
"Please select one of the following options:",
|
|
|
|
15, 75, 6, 5, welcome, selection)) {
|
1994-11-02 09:05:49 +00:00
|
|
|
dialog_clear();
|
|
|
|
end_dialog();
|
|
|
|
reboot(RB_AUTOBOOT);
|
1994-11-02 06:19:53 +00:00
|
|
|
}
|
1994-10-28 15:19:57 +00:00
|
|
|
switch (atoi(selection)) {
|
|
|
|
case 1: /* View readme */
|
1994-10-20 02:51:55 +00:00
|
|
|
if (!access(README_FILE, R_OK)) {
|
1994-10-28 15:19:57 +00:00
|
|
|
dialog_clear();
|
1994-11-02 07:37:40 +00:00
|
|
|
dialog_textbox("READ ME FIRST", README_FILE, LINES-1, COLS);
|
1994-11-02 06:19:53 +00:00
|
|
|
dialog_clear();
|
1994-10-20 02:51:55 +00:00
|
|
|
}
|
1994-11-02 06:19:53 +00:00
|
|
|
goto evil_goto;
|
1994-10-28 15:19:57 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 2: /* View copyrights */
|
1994-10-20 05:00:00 +00:00
|
|
|
if (!access(COPYRIGHT_FILE, R_OK)) {
|
1994-10-28 15:19:57 +00:00
|
|
|
dialog_clear();
|
1994-11-02 07:37:40 +00:00
|
|
|
dialog_textbox("COPYRIGHT", COPYRIGHT_FILE, LINES-1, COLS);
|
1994-11-02 06:19:53 +00:00
|
|
|
dialog_clear();
|
1994-10-20 05:00:00 +00:00
|
|
|
}
|
1994-11-02 06:19:53 +00:00
|
|
|
goto evil_goto;
|
1994-10-28 15:19:57 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 3: /* Proceed (do nothing special, really) */
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 4:
|
|
|
|
dialog_msgbox("Sorry!", "This feature not currently implemented.",
|
|
|
|
6, 75, 1);
|
1994-11-02 06:19:53 +00:00
|
|
|
goto evil_goto;
|
1994-10-28 15:19:57 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 5:
|
1994-11-02 09:05:49 +00:00
|
|
|
/* Be neat.. */
|
|
|
|
dialog_clear();
|
|
|
|
end_dialog();
|
|
|
|
reboot(RB_AUTOBOOT);
|
1994-10-28 15:19:57 +00:00
|
|
|
break; /* hope not! :) */
|
|
|
|
}
|
1994-10-20 02:51:55 +00:00
|
|
|
}
|