freebsd-dev/sbin/sysinstall/stage5.c
Jordan K. Hubbard dcaed5228b 1. Ask the user one final time before newfs'ing his disk into oblivion.
This means that even "proceed" can be chosen now without going
   irrevokably down that path.
2. Clean up the stage5 text.
1994-11-11 07:58:09 +00:00

51 lines
1.4 KiB
C

/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
* $Id: stage5.c,v 1.14 1994/11/08 14:04:19 jkh Exp $
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <dialog.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include "sysinstall.h"
static unsigned char msg[] = "
You are now done with the initial phase of the installation that
gets FreeBSD onto your hard disk. At this point, we need to go on
to use FTP, NFS, Tape, CD or DOS floppies to get a bindist onto your
system so that it's actually usable. Select Yes to proceed with this
phase, or No to simply drop into a shell.";
void
stage5()
{
int exec_sh = 1;
if (!dialog_yesno("End of initial installation", msg, 11, 76))
exec_sh = 0;
end_dialog();
dialog_active=0;
setenv("PATH","/stand",1);
for(;;) {
if (exec_sh)
exec (2,"/stand/sh","/stand/-sh", 0);
else
exec (3,"/stand/bininst","/stand/-bininst", 0);
}
}