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 " ,
1994-11-12 20:34:18 +00:00
" READ THIS FIRST. " ,
1994-11-05 08:20:08 +00:00
" 2. Release Notes " ,
1994-11-05 23:12:10 +00:00
" Read the 2.0 Release Notes (recommended). " ,
1994-11-12 20:34:18 +00:00
" 3. Troubleshooting " ,
" Read this if you're having trouble getting installed. "
" 4. COPYRIGHT " ,
1994-11-05 08:20:08 +00:00
" Read FreeBSD Copyright Information. " ,
1994-11-12 20:34:18 +00:00
" 5. Install " ,
" Proceed with full installation. " ,
" 6. Fixit " ,
1994-11-02 06:19:53 +00:00
" Repair existing installation (`fixit' mode). " ,
1994-11-12 20:34:18 +00:00
" 7. Quit " ,
1994-11-02 09:05:49 +00:00
" 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! " ,
1994-11-07 13:48:54 +00: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: " , 15 , 75 , 6 , 6 , welcome , selection ) )
ExitSysinstall ( ) ;
1994-10-28 15:19:57 +00:00
switch ( atoi ( selection ) ) {
1994-11-05 08:20:08 +00:00
case 1 : /* View the README */
1994-11-05 03:34:22 +00:00
ShowFile ( README_FILE , " Read Me First " ) ;
1994-11-02 06:19:53 +00:00
goto evil_goto ;
1994-10-28 15:19:57 +00:00
break ;
1994-11-05 08:20:08 +00:00
case 2 : /* View the release notes */
ShowFile ( RELNOTES_FILE , " Release Notes " ) ;
goto evil_goto ;
break ;
1994-11-12 20:34:18 +00:00
case 3 : /* View the troubleshooting file */
ShowFile ( TROUBLE_FILE , " Troubleshooting " ) ;
goto evil_goto ;
break ;
case 4 : /* View copyrights */
1994-11-05 03:34:22 +00:00
ShowFile ( COPYRIGHT_FILE , " COPYRIGHT " ) ;
1994-11-02 06:19:53 +00:00
goto evil_goto ;
1994-10-28 15:19:57 +00:00
break ;
1994-11-12 20:34:18 +00:00
case 5 : /* Proceed (do nothing special, really) */
1994-10-28 15:19:57 +00:00
break ;
1994-11-12 20:34:18 +00:00
case 6 :
dialog_msgbox ( " Sorry! " , " This feature is not currently implemented. " ,
1994-10-28 15:19:57 +00:00
6 , 75 , 1 ) ;
1994-11-02 06:19:53 +00:00
goto evil_goto ;
1994-10-28 15:19:57 +00:00
break ;
1994-11-05 08:20:08 +00:00
case 6 :
1994-11-02 09:05:49 +00:00
/* Be neat.. */
1994-11-07 13:48:54 +00:00
ExitSysinstall ( ) ;
1994-10-28 15:19:57 +00:00
break ; /* hope not! :) */
}
1994-10-20 02:51:55 +00:00
}