This will now write MBR entries - should be enough for testing.

This commit is contained in:
jkh 1995-05-04 19:48:19 +00:00
parent 35947edfc2
commit 1c3e871d62
27 changed files with 763 additions and 261 deletions

View File

@ -7,7 +7,7 @@ CLEANFILES= makedevs.c rtermcap
SRCS = globals.c main.c dmenu.c menus.c \
misc.c msg.c system.c install.c \
termcap.c makedevs.c media.c variable.c \
devices.c
devices.c dist.c lang.c
CFLAGS += -Wall -g -I${.CURDIR}/../libdisk
@ -27,6 +27,7 @@ makedevs.c: dev2c.sh Makefile rtermcap
# ( cd dev; sh ./MAKEDEV all )
# sh ${.CURDIR}/dev2c.sh dev > makedevs.tmp
# rm -rf dev
rm -f makedevs.tmp
uudecode < ${.CURDIR}/bteasy17.uu
file2c 'const unsigned char boot0[] = {' '};' \
< bteasy17 >> makedevs.tmp
@ -41,6 +42,15 @@ makedevs.c: dev2c.sh Makefile rtermcap
./rtermcap cons25-m | \
file2c 'const char termcap_cons25_m[] = {' ',0};' \
>> makedevs.tmp
./rtermcap cons25r | \
file2c 'const char termcap_cons25r[] = {' ',0};' \
>> makedevs.tmp
./rtermcap cons25r-m | \
file2c 'const char termcap_cons25r_m[] = {' ',0};' \
>> makedevs.tmp
./rtermcap cons25l1-m | \
file2c 'const char termcap_cons25l1_m[] = {' ',0};' \
>> makedevs.tmp
./rtermcap vt100 | \
file2c 'const char termcap_vt100[] = {' ',0};' \
>> makedevs.tmp

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: devices.c,v 1.1 1995/05/01 21:56:19 jkh Exp $
* $Id: devices.c,v 1.2 1995/05/04 03:51:14 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -43,6 +43,7 @@
#include "sysinstall.h"
#include "libdisk.h"
#include <ctype.h>
/* Where we start displaying chunk information on the screen */
#define CHUNK_START_ROW 5
@ -112,7 +113,6 @@ print_chunks(char *disk, struct disk *d)
mvprintw(3, 1, "%10s %10s %10s %8s %8s %8s %8s %8s",
"Offset", "Size", "End", "Name", "PType", "Desc",
"Subtype", "Flags");
attrset(A_NORMAL);
for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) {
if (i == current_chunk)
attrset(A_BOLD);
@ -132,9 +132,10 @@ print_command_summary()
mvprintw(15, 0, "The following commands are supported (in upper or lower case):");
mvprintw(17, 0, "C = Create New Partition D = Delete Partition");
mvprintw(18, 0, "B = Scan For Bad Blocks U = Undo All Changes");
mvprintw(19, 0, "ESC = Proceed to next screen");
mvprintw(19, 0, "W = Write Changes ESC = Proceed to next screen");
mvprintw(21, 0, "The currently selected partition is displayed in ");
attrset(A_BOLD); addstr("bold"); attrset(A_NORMAL);
mvprintw(22, 0, "Use F1 or `?' for help on this screen");
move(0, 0);
}
@ -172,7 +173,7 @@ device_slice_disk(char *disk)
}
refresh();
key = getch();
key = toupper(getch());
switch (key) {
case KEY_UP:
case '-':
@ -203,7 +204,6 @@ device_slice_disk(char *disk)
break;
case 'B':
case 'b':
if (chunk_info[current_chunk]->type != freebsd)
msg = "Can only scan for bad blocks in FreeBSD partition.";
else
@ -211,7 +211,6 @@ device_slice_disk(char *disk)
break;
case 'C':
case 'c':
if (chunk_info[current_chunk]->type != unused)
msg = "Partition in use, delete it first or move to an unused one.";
else {
@ -233,7 +232,6 @@ device_slice_disk(char *disk)
break;
case 'D':
case 'd':
if (chunk_info[current_chunk]->type == unused)
msg = "Partition is already unused!";
else {
@ -243,12 +241,18 @@ device_slice_disk(char *disk)
break;
case 'U':
case 'u':
Free_Disk(d);
d = Open_Disk(disk);
record_chunks(disk, d);
break;
case 'W':
if (!msgYesNo("Are you sure you want to write this to disk?"))
Write_Disk(d);
else
msg = "Write not confirmed";
break;
case 27: /* ESC */
chunking = FALSE;
break;

92
release/sysinstall/dist.c Normal file
View File

@ -0,0 +1,92 @@
/*
* The new sysinstall program.
*
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.5 1995/05/04 03:51:16 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer,
* verbatim and that no modifications are made prior to this
* point in the file.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Jordan Hubbard
* for the FreeBSD Project.
* 4. The name of Jordan Hubbard or the FreeBSD project may not be used to
* endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
#include "sysinstall.h"
unsigned int Dists;
unsigned int SrcDists;
int
distSetDeveloper(char *str)
{
Dists = _DIST_DEVELOPER;
SrcDists = DIST_SRC_ALL;
return 0;
}
int
distSetXDeveloper(char *str)
{
Dists = _DIST_XDEVELOPER;
SrcDists = DIST_SRC_ALL;
return 0;
}
int
distSetUser(char *str)
{
Dists = _DIST_USER;
return 0;
}
int
distSetXUser(char *str)
{
Dists = _DIST_XUSER;
return 0;
}
int
distSetMinimum(char *str)
{
Dists = DIST_BIN;
return 0;
}
int
distSetEverything(char *str)
{
Dists = DIST_ALL;
SrcDists = DIST_SRC_ALL;
return 0;
}

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.4 1995/05/01 21:56:22 jkh Exp $
* $Id: install.c,v 1.5 1995/05/04 03:51:16 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -133,40 +133,3 @@ installMaint(char *str)
msgConfirm("Sorry, maintainance mode is not implemented in this version.");
return 0;
}
int
installSetDeveloper(char *str)
{
/* Dists = DIST_BIN | DIST_MAN | DIST_FOO; */
return 0;
}
int
installSetXDeveloper(char *str)
{
return 0;
}
int
installSetUser(char *str)
{
return 0;
}
int
installSetXUser(char *str)
{
return 0;
}
int
installSetMinimum(char *str)
{
return 0;
}
int
installSetEverything(char *str)
{
return 0;
}

126
release/sysinstall/lang.c Normal file
View File

@ -0,0 +1,126 @@
/*
* The new sysinstall program.
*
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: menus.c,v 1.5 1995/05/04 03:51:19 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer,
* verbatim and that no modifications are made prior to this
* point in the file.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Jordan Hubbard
* for the FreeBSD Project.
* 4. The name of Jordan Hubbard or the FreeBSD project may not be used to
* endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
#include "sysinstall.h"
void
lang_set_Danish(char *str)
{
systemChangeFont("iso-8x14");
systemChangeLang("da_DK.ISO8859-1");
systemChangeTerminal("cons25l1", "cons25l1_m");
}
void
lang_set_Dutch(char *str)
{
systemChangeFont("iso-8x14");
systemChangeLang("nl_NL.ISO8859-1");
systemChangeTerminal("cons25l1", "cons25l1_m");
}
void
lang_set_English(char *str)
{
systemChangeFont("cp850-8x14");
systemChangeLang("en_US.ISO8859-1");
systemChangeTerminal("cons25", "cons25_m");
}
void
lang_set_French(char *str)
{
systemChangeFont("iso-8x14");
systemChangeLang("fr_FR.ISO8859-1");
systemChangeTerminal("cons25l1", "cons25l1_m");
}
void
lang_set_German(char *str)
{
systemChangeFont("iso-8x14");
systemChangeLang("de_DE.ISO8859-1");
systemChangeTerminal("cons25l1", "cons25l1_m");
}
void
lang_set_Italian(char *str)
{
systemChangeFont("iso-8x14");
systemChangeLang("it_IT.ISO8859-1");
systemChangeTerminal("cons25l1", "cons25l1_m");
}
/* Someday we will have to do a lot better than this */
void
lang_set_Japanese(char *str)
{
systemChangeFont("iso-8x14");
systemChangeLang("ja_JP.ROMAJI");
systemChangeTerminal("cons25", "cons25_m");
}
void
lang_set_Russian(char *str)
{
systemChangeFont("iso-8x14");
systemChangeLang("ru_SU.KOI8-R");
systemChangeTerminal("cons25r", "cons25r_m");
systemChangeScreenmap("koi8-r2cp866");
}
void
lang_set_Spanish(char *str)
{
systemChangeFont("iso-8x14");
systemChangeLang("es_ES.ISO8859-1");
systemChangeTerminal("cons25l1", "cons25l1_m");
}
void
lang_set_Swedish(char *str)
{
systemChangeFont("iso-8x14");
systemChangeLang("sv_SV.ISO8859-1");
systemChangeTerminal("cons25l1", "cons25l1_m");
}

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
* $Id: main.c,v 1.1.1.1 1995/04/27 12:50:34 jkh Exp $
* $Id: main.c,v 1.2 1995/05/04 03:51:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -43,6 +43,8 @@
#include "sysinstall.h"
extern DMenu MenuInitial;
int
main(int argc, char **argv)
{
@ -59,9 +61,12 @@ main(int argc, char **argv)
systemWelcome();
/* Begin user dialog at outer menu */
choice = scroll = curr = max = 0;
dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max);
while (1) {
choice = scroll = curr = max = 0;
dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max);
if (getpid() != 1 || !msgYesNo("Are you sure you wish to exit? System will reboot."))
break;
}
/* Say goodnight, Gracie */
systemShutdown();

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: menus.c,v 1.4 1995/05/01 21:56:25 jkh Exp $
* $Id: menus.c,v 1.5 1995/05/04 03:51:19 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -52,6 +52,7 @@
/* Forward decls for submenus */
extern DMenu MenuDocumentation;
extern DMenu MenuLanguage;
extern DMenu MenuMedia;
extern DMenu MenuInstallType;
extern DMenu MenuInstallOptions;
@ -121,25 +122,25 @@ of the english versions.", /* prompt */
"Press F1 for more information", /* help line */
"language.hlp", /* help file */
{ { "Danish", "Danish language and character set (ISO-8859-1)", /* D */
DMENU_SET_VARIABLE, (void *)"LANG=da_DK.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_Danish, 0 },
{ "Dutch", "Dutch language and character set (ISO-8859-1)", /* D */
DMENU_SET_VARIABLE, (void *)"LANG=nl_NL.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_Dutch, 0 },
{ "*English", "English language (system default)", /* E */
DMENU_SET_VARIABLE, (void *)"LANG=en_US.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_English, 0 },
{ "French", "French language and character set (ISO-8859-1)", /* F */
DMENU_SET_VARIABLE, (void *)"LANG=fr_FR.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_French, 0 },
{ "German", "German language and character set (ISO-8859-1)", /* G */
DMENU_SET_VARIABLE, (void *)"LANG=de_DE.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_German, 0 },
{ "Italian", "Italian language and character set (ISO-8859-1)", /* I */
DMENU_SET_VARIABLE, (void *)"LANG=it_IT.ISO8859-1", 0 },
{ "Japanese", "Japanese language and character set (JIS?)", /* J */
DMENU_SET_VARIABLE, (void *)"LANG=ja_JP.EUC", 0 },
DMENU_CALL, (void *)lang_set_Italian, 0 },
{ "Japanese", "Japanese language and default character set (romaji)",/* J */
DMENU_CALL, (void *)lang_set_Japanese, 0 },
{ "Russian", "Russian language and character set (cp866-8x14)", /* R */
DMENU_SET_VARIABLE, (void *)"LANG=ru_SU.KOI8-R", 0 },
DMENU_CALL, (void *)lang_set_Russian, 0 },
{ "Spanish", "Spanish language and character set (ISO-8859-1)", /* S */
DMENU_SET_VARIABLE, (void *)"LANG=es_ES.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_Spanish, 0 },
{ "Swedish", "Swedish language and character set (ISO-8859-1)", /* S */
DMENU_SET_VARIABLE, (void *)"LANG=sv_SV.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_Swedish, 0 },
{ NULL } },
};
@ -179,20 +180,20 @@ These pick what we consider to be the most reasonable defaults for the \
type of system in question. If you would prefer to pick and choose \
the list of distributions yourself, simply select `custom'.",
"Press F1 for more information on the various distributions",
"install_types.hlp",
"dist_types.hlp",
{ { "Developer", "Includes full sources, binaries and doc but no games.",
DMENU_CALL, (void *)installSetDeveloper, 0 },
DMENU_CALL, (void *)distSetDeveloper, 0 },
{ "X-Developer", "Same as above, but includes XFree86.",
DMENU_CALL, (void *)installSetXDeveloper, 0 },
DMENU_CALL, (void *)distSetXDeveloper, 0 },
{ "User", "General user. Binaries and doc but no sources.",
DMENU_CALL, (void *)installSetUser, 0 },
DMENU_CALL, (void *)distSetUser, 0 },
{ "X-User", "Same as above, but includes XFree86.",
DMENU_CALL, (void *)installSetXUser, 0 },
DMENU_CALL, (void *)distSetXUser, 0 },
{ "Minimal", "The smallest configuration possible.",
DMENU_CALL, (void *)installSetMinimum, 0 },
{ "Everything", "The entire kitchen sink, plus bedroom suite.",
DMENU_CALL, (void *)installSetEverything, 0 },
{ "Custom", "I don't want it canned! I want to drive!",
DMENU_CALL, (void *)distSetMinimum, 0 },
{ "Everything", "The entire source and binary distribution.",
DMENU_CALL, (void *)distSetEverything, 0 },
{ "Custom", "Specify your own distribution set",
DMENU_SUBMENU, (void *)&MenuDistributions, 0 },
{ NULL } },
};

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: msg.c,v 1.2 1995/05/01 21:56:29 jkh Exp $
* $Id: msg.c,v 1.3 1995/05/04 03:51:21 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -191,7 +191,7 @@ msgYesNo(char *fmt, ...)
va_end(args);
use_helpline(NULL);
use_helpfile(NULL);
ret = dialog_yesno("User Confirmation Request", errstr, -1, -1);
ret = dialog_yesno("Decision Required", errstr, -1, -1);
free(errstr);
return ret;
}
@ -202,8 +202,7 @@ msgGetInput(char *buf, char *fmt, ...)
{
va_list args;
char *errstr;
char *ret;
static input_buffer[256];
static char input_buffer[256];
int rval;
errstr = (char *)malloc(FILENAME_MAX);

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.4 1995/05/01 21:56:30 jkh Exp $
* $Id: sysinstall.h,v 1.5 1995/05/04 03:51:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -58,6 +58,49 @@
#define DMENU_MULTIPLE_TYPE 0x4 /* Multiple choice menu */
#define DMENU_SELECTION_RETURNS 0x8 /* Select item then exit */
/* Bitfields for distributions - hope we never have more than 32! :-) */
#define DIST_BIN 0x1
#define DIST_GAMES 0x2
#define DIST_MANPAGES 0x4
#define DIST_PROFLIBS 0x8
#define DIST_DICT 0x10
#define DIST_SRC 0x20
#define DIST_DES 0x40
#define DIST_COMPAT1X 0x80
#define DIST_XFREE86 0x100
#define DIST_ALL 0xFFF
/* Canned distribution sets */
#define _DIST_DEVELOPER \
(DIST_BIN | DIST_MANPAGES | DIST_DICT | DIST_PROFLIBS | DIST_SRC)
#define _DIST_XDEVELOPER \
(_DIST_DEVELOPER | DIST_XFREE86)
#define _DIST_USER \
(DIST_BIN | DIST_MANPAGES | DIST_DICT | DIST_COMPAT1X)
#define _DIST_XUSER \
(_DIST_USER | DIST_XFREE86)
/* Subtypes for SRC distribution */
#define DIST_SRC_BASE 0x1
#define DIST_SRC_GNU 0x2
#define DIST_SRC_ETC 0x4
#define DIST_SRC_GAMES 0x8
#define DIST_SRC_INCLUDE 0x10
#define DIST_SRC_LIB 0x20
#define DIST_SRC_LIBEXEC 0x40
#define DIST_SRC_LKM 0x80
#define DIST_SRC_RELEASE 0x100
#define DIST_SRC_SBIN 0x200
#define DIST_SRC_SHARE 0x400
#define DIST_SRC_SYS 0x800
#define DIST_SRC_UBIN 0x1000
#define DIST_SRC_USBIN 0x2000
#define DIST_SRC_ALL 0xFFFF
/* variable limits */
#define VAR_NAME_MAX 128
#define VAR_VALUE_MAX 1024
@ -130,9 +173,8 @@ extern Boolean OnCDROM; /* Are we running off of a CDROM? */
extern Boolean OnSerial; /* Are we on a serial console? */
extern Boolean DialogActive; /* Is the dialog() stuff up? */
extern Variable *VarHead; /* The head of the variable chain */
/* All the menus to which forward references exist */
extern DMenu MenuDocumenation, MenuInitial, MenuLanguage;
extern unsigned int Dists; /* Which distributions we want */
extern unsigned int SrcDists; /* Which src distributions we want */
/*** Prototypes ***/
@ -144,12 +186,14 @@ extern void globalsInit(void);
extern int installCustom(char *str);
extern int installExpress(char *str);
extern int installMaint(char *str);
extern int installSetDeveloper(char *str);
extern int installSetXDeveloper(char *str);
extern int installSetUser(char *str);
extern int installSetXUser(char *str);
extern int installSetMinimum(char *str);
extern int installSetEverything(char *str);
/* dist.c */
extern int distSetDeveloper(char *str);
extern int distSetXDeveloper(char *str);
extern int distSetUser(char *str);
extern int distSetXUser(char *str);
extern int distSetMinimum(char *str);
extern int distSetEverything(char *str);
/* system.c */
extern void systemInitialize(int argc, char **argv);
@ -159,6 +203,10 @@ extern int systemExecute(char *cmd);
extern int systemShellEscape(void);
extern int systemDisplayFile(char *file);
extern char *systemHelpFile(char *file, char *buf);
extern void systemChangeFont(char *font);
extern void systemChangeLang(char *lang);
extern void systemChangeTerminal(char *color, char *mono);
extern void systemChangeScreenmap(char *newmap);
/* dmenu.c */
extern void dmenuOpen(DMenu *menu, int *choice, int *scroll,
@ -208,5 +256,17 @@ extern DMenu *device_create_disk_menu(DMenu *menu, Device **rdevs,
extern void variable_set(char *var);
extern void variable_set2(char *name, char *value);
/* lang.c */
extern void lang_set_Danish(char *str);
extern void lang_set_Dutch(char *str);
extern void lang_set_English(char *str);
extern void lang_set_French(char *str);
extern void lang_set_German(char *str);
extern void lang_set_Italian(char *str);
extern void lang_set_Japanese(char *str);
extern void lang_set_Russian(char *str);
extern void lang_set_Spanish(char *str);
extern void lang_set_Swedish(char *str);
#endif
/* _SYSINSTALL_H_INCLUDE */

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: system.c,v 1.2 1995/04/29 19:33:06 jkh Exp $
* $Id: system.c,v 1.3 1995/05/01 21:56:31 jkh Exp $
*
* Jordan Hubbard
*
@ -199,3 +199,25 @@ systemHelpFile(char *file, char *buf)
}
return fname;
}
void
systemChangeFont(char *font)
{
}
void
systemChangeLang(char *lang)
{
variable_set2("LANG", lang);
}
void
systemChangeTerminal(char *color, char *mono)
{
/* Do something with setterm */
}
void
systemChangeScreenmap(char *newmap)
{
}

View File

@ -7,7 +7,7 @@ CLEANFILES= makedevs.c rtermcap
SRCS = globals.c main.c dmenu.c menus.c \
misc.c msg.c system.c install.c \
termcap.c makedevs.c media.c variable.c \
devices.c
devices.c dist.c lang.c
CFLAGS += -Wall -g -I${.CURDIR}/../libdisk
@ -27,6 +27,7 @@ makedevs.c: dev2c.sh Makefile rtermcap
# ( cd dev; sh ./MAKEDEV all )
# sh ${.CURDIR}/dev2c.sh dev > makedevs.tmp
# rm -rf dev
rm -f makedevs.tmp
uudecode < ${.CURDIR}/bteasy17.uu
file2c 'const unsigned char boot0[] = {' '};' \
< bteasy17 >> makedevs.tmp
@ -41,6 +42,15 @@ makedevs.c: dev2c.sh Makefile rtermcap
./rtermcap cons25-m | \
file2c 'const char termcap_cons25_m[] = {' ',0};' \
>> makedevs.tmp
./rtermcap cons25r | \
file2c 'const char termcap_cons25r[] = {' ',0};' \
>> makedevs.tmp
./rtermcap cons25r-m | \
file2c 'const char termcap_cons25r_m[] = {' ',0};' \
>> makedevs.tmp
./rtermcap cons25l1-m | \
file2c 'const char termcap_cons25l1_m[] = {' ',0};' \
>> makedevs.tmp
./rtermcap vt100 | \
file2c 'const char termcap_vt100[] = {' ',0};' \
>> makedevs.tmp

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: devices.c,v 1.1 1995/05/01 21:56:19 jkh Exp $
* $Id: devices.c,v 1.2 1995/05/04 03:51:14 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -43,6 +43,7 @@
#include "sysinstall.h"
#include "libdisk.h"
#include <ctype.h>
/* Where we start displaying chunk information on the screen */
#define CHUNK_START_ROW 5
@ -112,7 +113,6 @@ print_chunks(char *disk, struct disk *d)
mvprintw(3, 1, "%10s %10s %10s %8s %8s %8s %8s %8s",
"Offset", "Size", "End", "Name", "PType", "Desc",
"Subtype", "Flags");
attrset(A_NORMAL);
for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) {
if (i == current_chunk)
attrset(A_BOLD);
@ -132,9 +132,10 @@ print_command_summary()
mvprintw(15, 0, "The following commands are supported (in upper or lower case):");
mvprintw(17, 0, "C = Create New Partition D = Delete Partition");
mvprintw(18, 0, "B = Scan For Bad Blocks U = Undo All Changes");
mvprintw(19, 0, "ESC = Proceed to next screen");
mvprintw(19, 0, "W = Write Changes ESC = Proceed to next screen");
mvprintw(21, 0, "The currently selected partition is displayed in ");
attrset(A_BOLD); addstr("bold"); attrset(A_NORMAL);
mvprintw(22, 0, "Use F1 or `?' for help on this screen");
move(0, 0);
}
@ -172,7 +173,7 @@ device_slice_disk(char *disk)
}
refresh();
key = getch();
key = toupper(getch());
switch (key) {
case KEY_UP:
case '-':
@ -203,7 +204,6 @@ device_slice_disk(char *disk)
break;
case 'B':
case 'b':
if (chunk_info[current_chunk]->type != freebsd)
msg = "Can only scan for bad blocks in FreeBSD partition.";
else
@ -211,7 +211,6 @@ device_slice_disk(char *disk)
break;
case 'C':
case 'c':
if (chunk_info[current_chunk]->type != unused)
msg = "Partition in use, delete it first or move to an unused one.";
else {
@ -233,7 +232,6 @@ device_slice_disk(char *disk)
break;
case 'D':
case 'd':
if (chunk_info[current_chunk]->type == unused)
msg = "Partition is already unused!";
else {
@ -243,12 +241,18 @@ device_slice_disk(char *disk)
break;
case 'U':
case 'u':
Free_Disk(d);
d = Open_Disk(disk);
record_chunks(disk, d);
break;
case 'W':
if (!msgYesNo("Are you sure you want to write this to disk?"))
Write_Disk(d);
else
msg = "Write not confirmed";
break;
case 27: /* ESC */
chunking = FALSE;
break;

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.4 1995/05/01 21:56:22 jkh Exp $
* $Id: install.c,v 1.5 1995/05/04 03:51:16 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -133,40 +133,3 @@ installMaint(char *str)
msgConfirm("Sorry, maintainance mode is not implemented in this version.");
return 0;
}
int
installSetDeveloper(char *str)
{
/* Dists = DIST_BIN | DIST_MAN | DIST_FOO; */
return 0;
}
int
installSetXDeveloper(char *str)
{
return 0;
}
int
installSetUser(char *str)
{
return 0;
}
int
installSetXUser(char *str)
{
return 0;
}
int
installSetMinimum(char *str)
{
return 0;
}
int
installSetEverything(char *str)
{
return 0;
}

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
* $Id: main.c,v 1.1.1.1 1995/04/27 12:50:34 jkh Exp $
* $Id: main.c,v 1.2 1995/05/04 03:51:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -43,6 +43,8 @@
#include "sysinstall.h"
extern DMenu MenuInitial;
int
main(int argc, char **argv)
{
@ -59,9 +61,12 @@ main(int argc, char **argv)
systemWelcome();
/* Begin user dialog at outer menu */
choice = scroll = curr = max = 0;
dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max);
while (1) {
choice = scroll = curr = max = 0;
dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max);
if (getpid() != 1 || !msgYesNo("Are you sure you wish to exit? System will reboot."))
break;
}
/* Say goodnight, Gracie */
systemShutdown();

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: menus.c,v 1.4 1995/05/01 21:56:25 jkh Exp $
* $Id: menus.c,v 1.5 1995/05/04 03:51:19 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -52,6 +52,7 @@
/* Forward decls for submenus */
extern DMenu MenuDocumentation;
extern DMenu MenuLanguage;
extern DMenu MenuMedia;
extern DMenu MenuInstallType;
extern DMenu MenuInstallOptions;
@ -121,25 +122,25 @@ of the english versions.", /* prompt */
"Press F1 for more information", /* help line */
"language.hlp", /* help file */
{ { "Danish", "Danish language and character set (ISO-8859-1)", /* D */
DMENU_SET_VARIABLE, (void *)"LANG=da_DK.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_Danish, 0 },
{ "Dutch", "Dutch language and character set (ISO-8859-1)", /* D */
DMENU_SET_VARIABLE, (void *)"LANG=nl_NL.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_Dutch, 0 },
{ "*English", "English language (system default)", /* E */
DMENU_SET_VARIABLE, (void *)"LANG=en_US.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_English, 0 },
{ "French", "French language and character set (ISO-8859-1)", /* F */
DMENU_SET_VARIABLE, (void *)"LANG=fr_FR.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_French, 0 },
{ "German", "German language and character set (ISO-8859-1)", /* G */
DMENU_SET_VARIABLE, (void *)"LANG=de_DE.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_German, 0 },
{ "Italian", "Italian language and character set (ISO-8859-1)", /* I */
DMENU_SET_VARIABLE, (void *)"LANG=it_IT.ISO8859-1", 0 },
{ "Japanese", "Japanese language and character set (JIS?)", /* J */
DMENU_SET_VARIABLE, (void *)"LANG=ja_JP.EUC", 0 },
DMENU_CALL, (void *)lang_set_Italian, 0 },
{ "Japanese", "Japanese language and default character set (romaji)",/* J */
DMENU_CALL, (void *)lang_set_Japanese, 0 },
{ "Russian", "Russian language and character set (cp866-8x14)", /* R */
DMENU_SET_VARIABLE, (void *)"LANG=ru_SU.KOI8-R", 0 },
DMENU_CALL, (void *)lang_set_Russian, 0 },
{ "Spanish", "Spanish language and character set (ISO-8859-1)", /* S */
DMENU_SET_VARIABLE, (void *)"LANG=es_ES.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_Spanish, 0 },
{ "Swedish", "Swedish language and character set (ISO-8859-1)", /* S */
DMENU_SET_VARIABLE, (void *)"LANG=sv_SV.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_Swedish, 0 },
{ NULL } },
};
@ -179,20 +180,20 @@ These pick what we consider to be the most reasonable defaults for the \
type of system in question. If you would prefer to pick and choose \
the list of distributions yourself, simply select `custom'.",
"Press F1 for more information on the various distributions",
"install_types.hlp",
"dist_types.hlp",
{ { "Developer", "Includes full sources, binaries and doc but no games.",
DMENU_CALL, (void *)installSetDeveloper, 0 },
DMENU_CALL, (void *)distSetDeveloper, 0 },
{ "X-Developer", "Same as above, but includes XFree86.",
DMENU_CALL, (void *)installSetXDeveloper, 0 },
DMENU_CALL, (void *)distSetXDeveloper, 0 },
{ "User", "General user. Binaries and doc but no sources.",
DMENU_CALL, (void *)installSetUser, 0 },
DMENU_CALL, (void *)distSetUser, 0 },
{ "X-User", "Same as above, but includes XFree86.",
DMENU_CALL, (void *)installSetXUser, 0 },
DMENU_CALL, (void *)distSetXUser, 0 },
{ "Minimal", "The smallest configuration possible.",
DMENU_CALL, (void *)installSetMinimum, 0 },
{ "Everything", "The entire kitchen sink, plus bedroom suite.",
DMENU_CALL, (void *)installSetEverything, 0 },
{ "Custom", "I don't want it canned! I want to drive!",
DMENU_CALL, (void *)distSetMinimum, 0 },
{ "Everything", "The entire source and binary distribution.",
DMENU_CALL, (void *)distSetEverything, 0 },
{ "Custom", "Specify your own distribution set",
DMENU_SUBMENU, (void *)&MenuDistributions, 0 },
{ NULL } },
};

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: msg.c,v 1.2 1995/05/01 21:56:29 jkh Exp $
* $Id: msg.c,v 1.3 1995/05/04 03:51:21 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -191,7 +191,7 @@ msgYesNo(char *fmt, ...)
va_end(args);
use_helpline(NULL);
use_helpfile(NULL);
ret = dialog_yesno("User Confirmation Request", errstr, -1, -1);
ret = dialog_yesno("Decision Required", errstr, -1, -1);
free(errstr);
return ret;
}
@ -202,8 +202,7 @@ msgGetInput(char *buf, char *fmt, ...)
{
va_list args;
char *errstr;
char *ret;
static input_buffer[256];
static char input_buffer[256];
int rval;
errstr = (char *)malloc(FILENAME_MAX);

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.4 1995/05/01 21:56:30 jkh Exp $
* $Id: sysinstall.h,v 1.5 1995/05/04 03:51:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -58,6 +58,49 @@
#define DMENU_MULTIPLE_TYPE 0x4 /* Multiple choice menu */
#define DMENU_SELECTION_RETURNS 0x8 /* Select item then exit */
/* Bitfields for distributions - hope we never have more than 32! :-) */
#define DIST_BIN 0x1
#define DIST_GAMES 0x2
#define DIST_MANPAGES 0x4
#define DIST_PROFLIBS 0x8
#define DIST_DICT 0x10
#define DIST_SRC 0x20
#define DIST_DES 0x40
#define DIST_COMPAT1X 0x80
#define DIST_XFREE86 0x100
#define DIST_ALL 0xFFF
/* Canned distribution sets */
#define _DIST_DEVELOPER \
(DIST_BIN | DIST_MANPAGES | DIST_DICT | DIST_PROFLIBS | DIST_SRC)
#define _DIST_XDEVELOPER \
(_DIST_DEVELOPER | DIST_XFREE86)
#define _DIST_USER \
(DIST_BIN | DIST_MANPAGES | DIST_DICT | DIST_COMPAT1X)
#define _DIST_XUSER \
(_DIST_USER | DIST_XFREE86)
/* Subtypes for SRC distribution */
#define DIST_SRC_BASE 0x1
#define DIST_SRC_GNU 0x2
#define DIST_SRC_ETC 0x4
#define DIST_SRC_GAMES 0x8
#define DIST_SRC_INCLUDE 0x10
#define DIST_SRC_LIB 0x20
#define DIST_SRC_LIBEXEC 0x40
#define DIST_SRC_LKM 0x80
#define DIST_SRC_RELEASE 0x100
#define DIST_SRC_SBIN 0x200
#define DIST_SRC_SHARE 0x400
#define DIST_SRC_SYS 0x800
#define DIST_SRC_UBIN 0x1000
#define DIST_SRC_USBIN 0x2000
#define DIST_SRC_ALL 0xFFFF
/* variable limits */
#define VAR_NAME_MAX 128
#define VAR_VALUE_MAX 1024
@ -130,9 +173,8 @@ extern Boolean OnCDROM; /* Are we running off of a CDROM? */
extern Boolean OnSerial; /* Are we on a serial console? */
extern Boolean DialogActive; /* Is the dialog() stuff up? */
extern Variable *VarHead; /* The head of the variable chain */
/* All the menus to which forward references exist */
extern DMenu MenuDocumenation, MenuInitial, MenuLanguage;
extern unsigned int Dists; /* Which distributions we want */
extern unsigned int SrcDists; /* Which src distributions we want */
/*** Prototypes ***/
@ -144,12 +186,14 @@ extern void globalsInit(void);
extern int installCustom(char *str);
extern int installExpress(char *str);
extern int installMaint(char *str);
extern int installSetDeveloper(char *str);
extern int installSetXDeveloper(char *str);
extern int installSetUser(char *str);
extern int installSetXUser(char *str);
extern int installSetMinimum(char *str);
extern int installSetEverything(char *str);
/* dist.c */
extern int distSetDeveloper(char *str);
extern int distSetXDeveloper(char *str);
extern int distSetUser(char *str);
extern int distSetXUser(char *str);
extern int distSetMinimum(char *str);
extern int distSetEverything(char *str);
/* system.c */
extern void systemInitialize(int argc, char **argv);
@ -159,6 +203,10 @@ extern int systemExecute(char *cmd);
extern int systemShellEscape(void);
extern int systemDisplayFile(char *file);
extern char *systemHelpFile(char *file, char *buf);
extern void systemChangeFont(char *font);
extern void systemChangeLang(char *lang);
extern void systemChangeTerminal(char *color, char *mono);
extern void systemChangeScreenmap(char *newmap);
/* dmenu.c */
extern void dmenuOpen(DMenu *menu, int *choice, int *scroll,
@ -208,5 +256,17 @@ extern DMenu *device_create_disk_menu(DMenu *menu, Device **rdevs,
extern void variable_set(char *var);
extern void variable_set2(char *name, char *value);
/* lang.c */
extern void lang_set_Danish(char *str);
extern void lang_set_Dutch(char *str);
extern void lang_set_English(char *str);
extern void lang_set_French(char *str);
extern void lang_set_German(char *str);
extern void lang_set_Italian(char *str);
extern void lang_set_Japanese(char *str);
extern void lang_set_Russian(char *str);
extern void lang_set_Spanish(char *str);
extern void lang_set_Swedish(char *str);
#endif
/* _SYSINSTALL_H_INCLUDE */

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: system.c,v 1.2 1995/04/29 19:33:06 jkh Exp $
* $Id: system.c,v 1.3 1995/05/01 21:56:31 jkh Exp $
*
* Jordan Hubbard
*
@ -199,3 +199,25 @@ systemHelpFile(char *file, char *buf)
}
return fname;
}
void
systemChangeFont(char *font)
{
}
void
systemChangeLang(char *lang)
{
variable_set2("LANG", lang);
}
void
systemChangeTerminal(char *color, char *mono)
{
/* Do something with setterm */
}
void
systemChangeScreenmap(char *newmap)
{
}

View File

@ -7,7 +7,7 @@ CLEANFILES= makedevs.c rtermcap
SRCS = globals.c main.c dmenu.c menus.c \
misc.c msg.c system.c install.c \
termcap.c makedevs.c media.c variable.c \
devices.c
devices.c dist.c lang.c
CFLAGS += -Wall -g -I${.CURDIR}/../libdisk
@ -27,6 +27,7 @@ makedevs.c: dev2c.sh Makefile rtermcap
# ( cd dev; sh ./MAKEDEV all )
# sh ${.CURDIR}/dev2c.sh dev > makedevs.tmp
# rm -rf dev
rm -f makedevs.tmp
uudecode < ${.CURDIR}/bteasy17.uu
file2c 'const unsigned char boot0[] = {' '};' \
< bteasy17 >> makedevs.tmp
@ -41,6 +42,15 @@ makedevs.c: dev2c.sh Makefile rtermcap
./rtermcap cons25-m | \
file2c 'const char termcap_cons25_m[] = {' ',0};' \
>> makedevs.tmp
./rtermcap cons25r | \
file2c 'const char termcap_cons25r[] = {' ',0};' \
>> makedevs.tmp
./rtermcap cons25r-m | \
file2c 'const char termcap_cons25r_m[] = {' ',0};' \
>> makedevs.tmp
./rtermcap cons25l1-m | \
file2c 'const char termcap_cons25l1_m[] = {' ',0};' \
>> makedevs.tmp
./rtermcap vt100 | \
file2c 'const char termcap_vt100[] = {' ',0};' \
>> makedevs.tmp

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: devices.c,v 1.1 1995/05/01 21:56:19 jkh Exp $
* $Id: devices.c,v 1.2 1995/05/04 03:51:14 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -43,6 +43,7 @@
#include "sysinstall.h"
#include "libdisk.h"
#include <ctype.h>
/* Where we start displaying chunk information on the screen */
#define CHUNK_START_ROW 5
@ -112,7 +113,6 @@ print_chunks(char *disk, struct disk *d)
mvprintw(3, 1, "%10s %10s %10s %8s %8s %8s %8s %8s",
"Offset", "Size", "End", "Name", "PType", "Desc",
"Subtype", "Flags");
attrset(A_NORMAL);
for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) {
if (i == current_chunk)
attrset(A_BOLD);
@ -132,9 +132,10 @@ print_command_summary()
mvprintw(15, 0, "The following commands are supported (in upper or lower case):");
mvprintw(17, 0, "C = Create New Partition D = Delete Partition");
mvprintw(18, 0, "B = Scan For Bad Blocks U = Undo All Changes");
mvprintw(19, 0, "ESC = Proceed to next screen");
mvprintw(19, 0, "W = Write Changes ESC = Proceed to next screen");
mvprintw(21, 0, "The currently selected partition is displayed in ");
attrset(A_BOLD); addstr("bold"); attrset(A_NORMAL);
mvprintw(22, 0, "Use F1 or `?' for help on this screen");
move(0, 0);
}
@ -172,7 +173,7 @@ device_slice_disk(char *disk)
}
refresh();
key = getch();
key = toupper(getch());
switch (key) {
case KEY_UP:
case '-':
@ -203,7 +204,6 @@ device_slice_disk(char *disk)
break;
case 'B':
case 'b':
if (chunk_info[current_chunk]->type != freebsd)
msg = "Can only scan for bad blocks in FreeBSD partition.";
else
@ -211,7 +211,6 @@ device_slice_disk(char *disk)
break;
case 'C':
case 'c':
if (chunk_info[current_chunk]->type != unused)
msg = "Partition in use, delete it first or move to an unused one.";
else {
@ -233,7 +232,6 @@ device_slice_disk(char *disk)
break;
case 'D':
case 'd':
if (chunk_info[current_chunk]->type == unused)
msg = "Partition is already unused!";
else {
@ -243,12 +241,18 @@ device_slice_disk(char *disk)
break;
case 'U':
case 'u':
Free_Disk(d);
d = Open_Disk(disk);
record_chunks(disk, d);
break;
case 'W':
if (!msgYesNo("Are you sure you want to write this to disk?"))
Write_Disk(d);
else
msg = "Write not confirmed";
break;
case 27: /* ESC */
chunking = FALSE;
break;

View File

@ -0,0 +1,92 @@
/*
* The new sysinstall program.
*
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.5 1995/05/04 03:51:16 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer,
* verbatim and that no modifications are made prior to this
* point in the file.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Jordan Hubbard
* for the FreeBSD Project.
* 4. The name of Jordan Hubbard or the FreeBSD project may not be used to
* endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
#include "sysinstall.h"
unsigned int Dists;
unsigned int SrcDists;
int
distSetDeveloper(char *str)
{
Dists = _DIST_DEVELOPER;
SrcDists = DIST_SRC_ALL;
return 0;
}
int
distSetXDeveloper(char *str)
{
Dists = _DIST_XDEVELOPER;
SrcDists = DIST_SRC_ALL;
return 0;
}
int
distSetUser(char *str)
{
Dists = _DIST_USER;
return 0;
}
int
distSetXUser(char *str)
{
Dists = _DIST_XUSER;
return 0;
}
int
distSetMinimum(char *str)
{
Dists = DIST_BIN;
return 0;
}
int
distSetEverything(char *str)
{
Dists = DIST_ALL;
SrcDists = DIST_SRC_ALL;
return 0;
}

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.4 1995/05/01 21:56:22 jkh Exp $
* $Id: install.c,v 1.5 1995/05/04 03:51:16 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -133,40 +133,3 @@ installMaint(char *str)
msgConfirm("Sorry, maintainance mode is not implemented in this version.");
return 0;
}
int
installSetDeveloper(char *str)
{
/* Dists = DIST_BIN | DIST_MAN | DIST_FOO; */
return 0;
}
int
installSetXDeveloper(char *str)
{
return 0;
}
int
installSetUser(char *str)
{
return 0;
}
int
installSetXUser(char *str)
{
return 0;
}
int
installSetMinimum(char *str)
{
return 0;
}
int
installSetEverything(char *str)
{
return 0;
}

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
* $Id: main.c,v 1.1.1.1 1995/04/27 12:50:34 jkh Exp $
* $Id: main.c,v 1.2 1995/05/04 03:51:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -43,6 +43,8 @@
#include "sysinstall.h"
extern DMenu MenuInitial;
int
main(int argc, char **argv)
{
@ -59,9 +61,12 @@ main(int argc, char **argv)
systemWelcome();
/* Begin user dialog at outer menu */
choice = scroll = curr = max = 0;
dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max);
while (1) {
choice = scroll = curr = max = 0;
dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max);
if (getpid() != 1 || !msgYesNo("Are you sure you wish to exit? System will reboot."))
break;
}
/* Say goodnight, Gracie */
systemShutdown();

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: menus.c,v 1.4 1995/05/01 21:56:25 jkh Exp $
* $Id: menus.c,v 1.5 1995/05/04 03:51:19 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -52,6 +52,7 @@
/* Forward decls for submenus */
extern DMenu MenuDocumentation;
extern DMenu MenuLanguage;
extern DMenu MenuMedia;
extern DMenu MenuInstallType;
extern DMenu MenuInstallOptions;
@ -121,25 +122,25 @@ of the english versions.", /* prompt */
"Press F1 for more information", /* help line */
"language.hlp", /* help file */
{ { "Danish", "Danish language and character set (ISO-8859-1)", /* D */
DMENU_SET_VARIABLE, (void *)"LANG=da_DK.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_Danish, 0 },
{ "Dutch", "Dutch language and character set (ISO-8859-1)", /* D */
DMENU_SET_VARIABLE, (void *)"LANG=nl_NL.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_Dutch, 0 },
{ "*English", "English language (system default)", /* E */
DMENU_SET_VARIABLE, (void *)"LANG=en_US.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_English, 0 },
{ "French", "French language and character set (ISO-8859-1)", /* F */
DMENU_SET_VARIABLE, (void *)"LANG=fr_FR.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_French, 0 },
{ "German", "German language and character set (ISO-8859-1)", /* G */
DMENU_SET_VARIABLE, (void *)"LANG=de_DE.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_German, 0 },
{ "Italian", "Italian language and character set (ISO-8859-1)", /* I */
DMENU_SET_VARIABLE, (void *)"LANG=it_IT.ISO8859-1", 0 },
{ "Japanese", "Japanese language and character set (JIS?)", /* J */
DMENU_SET_VARIABLE, (void *)"LANG=ja_JP.EUC", 0 },
DMENU_CALL, (void *)lang_set_Italian, 0 },
{ "Japanese", "Japanese language and default character set (romaji)",/* J */
DMENU_CALL, (void *)lang_set_Japanese, 0 },
{ "Russian", "Russian language and character set (cp866-8x14)", /* R */
DMENU_SET_VARIABLE, (void *)"LANG=ru_SU.KOI8-R", 0 },
DMENU_CALL, (void *)lang_set_Russian, 0 },
{ "Spanish", "Spanish language and character set (ISO-8859-1)", /* S */
DMENU_SET_VARIABLE, (void *)"LANG=es_ES.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_Spanish, 0 },
{ "Swedish", "Swedish language and character set (ISO-8859-1)", /* S */
DMENU_SET_VARIABLE, (void *)"LANG=sv_SV.ISO8859-1", 0 },
DMENU_CALL, (void *)lang_set_Swedish, 0 },
{ NULL } },
};
@ -179,20 +180,20 @@ These pick what we consider to be the most reasonable defaults for the \
type of system in question. If you would prefer to pick and choose \
the list of distributions yourself, simply select `custom'.",
"Press F1 for more information on the various distributions",
"install_types.hlp",
"dist_types.hlp",
{ { "Developer", "Includes full sources, binaries and doc but no games.",
DMENU_CALL, (void *)installSetDeveloper, 0 },
DMENU_CALL, (void *)distSetDeveloper, 0 },
{ "X-Developer", "Same as above, but includes XFree86.",
DMENU_CALL, (void *)installSetXDeveloper, 0 },
DMENU_CALL, (void *)distSetXDeveloper, 0 },
{ "User", "General user. Binaries and doc but no sources.",
DMENU_CALL, (void *)installSetUser, 0 },
DMENU_CALL, (void *)distSetUser, 0 },
{ "X-User", "Same as above, but includes XFree86.",
DMENU_CALL, (void *)installSetXUser, 0 },
DMENU_CALL, (void *)distSetXUser, 0 },
{ "Minimal", "The smallest configuration possible.",
DMENU_CALL, (void *)installSetMinimum, 0 },
{ "Everything", "The entire kitchen sink, plus bedroom suite.",
DMENU_CALL, (void *)installSetEverything, 0 },
{ "Custom", "I don't want it canned! I want to drive!",
DMENU_CALL, (void *)distSetMinimum, 0 },
{ "Everything", "The entire source and binary distribution.",
DMENU_CALL, (void *)distSetEverything, 0 },
{ "Custom", "Specify your own distribution set",
DMENU_SUBMENU, (void *)&MenuDistributions, 0 },
{ NULL } },
};

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: msg.c,v 1.2 1995/05/01 21:56:29 jkh Exp $
* $Id: msg.c,v 1.3 1995/05/04 03:51:21 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -191,7 +191,7 @@ msgYesNo(char *fmt, ...)
va_end(args);
use_helpline(NULL);
use_helpfile(NULL);
ret = dialog_yesno("User Confirmation Request", errstr, -1, -1);
ret = dialog_yesno("Decision Required", errstr, -1, -1);
free(errstr);
return ret;
}
@ -202,8 +202,7 @@ msgGetInput(char *buf, char *fmt, ...)
{
va_list args;
char *errstr;
char *ret;
static input_buffer[256];
static char input_buffer[256];
int rval;
errstr = (char *)malloc(FILENAME_MAX);

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.4 1995/05/01 21:56:30 jkh Exp $
* $Id: sysinstall.h,v 1.5 1995/05/04 03:51:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -58,6 +58,49 @@
#define DMENU_MULTIPLE_TYPE 0x4 /* Multiple choice menu */
#define DMENU_SELECTION_RETURNS 0x8 /* Select item then exit */
/* Bitfields for distributions - hope we never have more than 32! :-) */
#define DIST_BIN 0x1
#define DIST_GAMES 0x2
#define DIST_MANPAGES 0x4
#define DIST_PROFLIBS 0x8
#define DIST_DICT 0x10
#define DIST_SRC 0x20
#define DIST_DES 0x40
#define DIST_COMPAT1X 0x80
#define DIST_XFREE86 0x100
#define DIST_ALL 0xFFF
/* Canned distribution sets */
#define _DIST_DEVELOPER \
(DIST_BIN | DIST_MANPAGES | DIST_DICT | DIST_PROFLIBS | DIST_SRC)
#define _DIST_XDEVELOPER \
(_DIST_DEVELOPER | DIST_XFREE86)
#define _DIST_USER \
(DIST_BIN | DIST_MANPAGES | DIST_DICT | DIST_COMPAT1X)
#define _DIST_XUSER \
(_DIST_USER | DIST_XFREE86)
/* Subtypes for SRC distribution */
#define DIST_SRC_BASE 0x1
#define DIST_SRC_GNU 0x2
#define DIST_SRC_ETC 0x4
#define DIST_SRC_GAMES 0x8
#define DIST_SRC_INCLUDE 0x10
#define DIST_SRC_LIB 0x20
#define DIST_SRC_LIBEXEC 0x40
#define DIST_SRC_LKM 0x80
#define DIST_SRC_RELEASE 0x100
#define DIST_SRC_SBIN 0x200
#define DIST_SRC_SHARE 0x400
#define DIST_SRC_SYS 0x800
#define DIST_SRC_UBIN 0x1000
#define DIST_SRC_USBIN 0x2000
#define DIST_SRC_ALL 0xFFFF
/* variable limits */
#define VAR_NAME_MAX 128
#define VAR_VALUE_MAX 1024
@ -130,9 +173,8 @@ extern Boolean OnCDROM; /* Are we running off of a CDROM? */
extern Boolean OnSerial; /* Are we on a serial console? */
extern Boolean DialogActive; /* Is the dialog() stuff up? */
extern Variable *VarHead; /* The head of the variable chain */
/* All the menus to which forward references exist */
extern DMenu MenuDocumenation, MenuInitial, MenuLanguage;
extern unsigned int Dists; /* Which distributions we want */
extern unsigned int SrcDists; /* Which src distributions we want */
/*** Prototypes ***/
@ -144,12 +186,14 @@ extern void globalsInit(void);
extern int installCustom(char *str);
extern int installExpress(char *str);
extern int installMaint(char *str);
extern int installSetDeveloper(char *str);
extern int installSetXDeveloper(char *str);
extern int installSetUser(char *str);
extern int installSetXUser(char *str);
extern int installSetMinimum(char *str);
extern int installSetEverything(char *str);
/* dist.c */
extern int distSetDeveloper(char *str);
extern int distSetXDeveloper(char *str);
extern int distSetUser(char *str);
extern int distSetXUser(char *str);
extern int distSetMinimum(char *str);
extern int distSetEverything(char *str);
/* system.c */
extern void systemInitialize(int argc, char **argv);
@ -159,6 +203,10 @@ extern int systemExecute(char *cmd);
extern int systemShellEscape(void);
extern int systemDisplayFile(char *file);
extern char *systemHelpFile(char *file, char *buf);
extern void systemChangeFont(char *font);
extern void systemChangeLang(char *lang);
extern void systemChangeTerminal(char *color, char *mono);
extern void systemChangeScreenmap(char *newmap);
/* dmenu.c */
extern void dmenuOpen(DMenu *menu, int *choice, int *scroll,
@ -208,5 +256,17 @@ extern DMenu *device_create_disk_menu(DMenu *menu, Device **rdevs,
extern void variable_set(char *var);
extern void variable_set2(char *name, char *value);
/* lang.c */
extern void lang_set_Danish(char *str);
extern void lang_set_Dutch(char *str);
extern void lang_set_English(char *str);
extern void lang_set_French(char *str);
extern void lang_set_German(char *str);
extern void lang_set_Italian(char *str);
extern void lang_set_Japanese(char *str);
extern void lang_set_Russian(char *str);
extern void lang_set_Spanish(char *str);
extern void lang_set_Swedish(char *str);
#endif
/* _SYSINSTALL_H_INCLUDE */

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: system.c,v 1.2 1995/04/29 19:33:06 jkh Exp $
* $Id: system.c,v 1.3 1995/05/01 21:56:31 jkh Exp $
*
* Jordan Hubbard
*
@ -199,3 +199,25 @@ systemHelpFile(char *file, char *buf)
}
return fname;
}
void
systemChangeFont(char *font)
{
}
void
systemChangeLang(char *lang)
{
variable_set2("LANG", lang);
}
void
systemChangeTerminal(char *color, char *mono)
{
/* Do something with setterm */
}
void
systemChangeScreenmap(char *newmap)
{
}