1994-10-20 03:51:55 +01:00
/*
1994-10-28 16:19:57 +01:00
* Copyright ( c ) 1994 , Jordan Hubbard , Paul Richards and Poul - Henning Kamp .
1994-10-20 03:51:55 +01:00
*
1994-10-28 16:19:57 +01:00
* All rights reserved .
1994-10-20 03:51:55 +01:00
*
1994-10-28 16:19:57 +01: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 03:51:55 +01:00
*/
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <unistd.h>
1994-11-02 12:00:35 +01:00
# include <sys/reboot.h>
1994-10-20 03:51:55 +01:00
# include <dialog.h>
# include "sysinstall.h"
1994-11-02 07:19:53 +01:00
static unsigned char * welcome [ ] = {
" 1. README " ,
1994-11-12 21:34:18 +01:00
" READ THIS FIRST. " ,
1994-11-05 09:20:08 +01:00
" 2. Release Notes " ,
1994-12-28 00:26:59 +01:00
" Read the 2.0 Release Notes (recommended). " ,
1994-11-12 21:34:18 +01:00
" 3. Troubleshooting " ,
1994-11-13 05:20:23 +01:00
" Read this in case of trouble. " ,
1994-12-28 00:26:59 +01:00
" 4. Partitions and MBRs " ,
" Verbose description of how these work. " ,
" 5. COPYRIGHT " ,
1994-11-05 09:20:08 +01:00
" Read FreeBSD Copyright Information. " ,
1994-12-28 00:26:59 +01:00
" 6. Install " ,
1994-11-12 21:34:18 +01:00
" Proceed with full installation. " ,
1994-12-28 00:26:59 +01:00
" 7. Fixit " ,
1995-01-14 08:30:30 +01:00
" Repair existing installation (fixit mode). " ,
1994-12-28 00:26:59 +01:00
" 8. Quit " ,
1994-11-02 10:05:49 +01:00
" Don't do anything, just reboot. " ,
1994-10-28 16:19:57 +01:00
} ;
1994-10-29 11:01:40 +01:00
void
stage0 ( )
1994-10-20 03:51:55 +01:00
{
1994-11-02 07:19:53 +01:00
evil_goto :
if ( dialog_menu ( " Welcome to FreeBSD! " ,
1995-02-15 20:48:10 +01:00
" Use ALT-F2 and ALT-F1 to toggle between debugging \n information screen (ALT-F2) or this dialog screen (ALT-F1) \n \n Please select one of the following options: " , - 1 , - 1 , 8 , 8 , welcome , selection , NULL , NULL ) )
1994-11-07 14:48:54 +01:00
ExitSysinstall ( ) ;
1994-10-28 16:19:57 +01:00
switch ( atoi ( selection ) ) {
1994-11-05 09:20:08 +01:00
case 1 : /* View the README */
1994-11-05 04:34:22 +01:00
ShowFile ( README_FILE , " Read Me First " ) ;
1994-11-02 07:19:53 +01:00
goto evil_goto ;
1994-10-28 16:19:57 +01:00
break ;
1994-11-05 09:20:08 +01:00
case 2 : /* View the release notes */
ShowFile ( RELNOTES_FILE , " Release Notes " ) ;
goto evil_goto ;
break ;
1994-11-12 21:34:18 +01:00
case 3 : /* View the troubleshooting file */
ShowFile ( TROUBLE_FILE , " Troubleshooting " ) ;
goto evil_goto ;
break ;
1994-12-28 00:26:59 +01:00
case 4 : /* View DISK FAQ */
ShowFile ( HELPME_FILE , " DISK FAQ " ) ;
1994-11-02 07:19:53 +01:00
goto evil_goto ;
1994-10-28 16:19:57 +01:00
break ;
1994-12-28 00:26:59 +01:00
case 5 : /* View copyrights */
ShowFile ( COPYRIGHT_FILE , " COPYRIGHT " ) ;
goto evil_goto ;
1994-10-28 16:19:57 +01:00
break ;
1994-12-28 00:26:59 +01:00
case 6 : /* Proceed (do nothing special, really) */
fixit = 0 ;
1994-10-28 16:19:57 +01:00
break ;
1994-11-13 03:06:50 +01:00
case 7 :
1994-12-28 00:26:59 +01:00
dialog_clear ( ) ;
dialog_update ( ) ;
dialog_msgbox ( " WARNING! " ,
" The usual install procedure will be invoked, but with most of the
sanity checks disabled . The suggested course of action is to :
1. Go to ( F ) disk and do a ( W ) rite , and possibly a ( B ) oot too
if your MBR has been wiped .
2. Go into ( D ) isklabel and identify your root ( / ) and swap
partitions .
3. Select ( P ) roceed to reboot and load the cpio floppy .
4. You will now be in the stand - alone shell , where you may
conduct further repairs with the tools you ' ll find in
/ stand .
5. Good luck . . . You ' ll probably need it . " , -1, -1, 1);
fixit = 1 ;
break ;
case 8 :
1994-11-02 10:05:49 +01:00
/* Be neat.. */
1994-11-07 14:48:54 +01:00
ExitSysinstall ( ) ;
1994-10-28 16:19:57 +01:00
break ; /* hope not! :) */
}
1994-10-20 03:51:55 +01:00
}