MFC: Catch 3.2-stable sysinstall up to 4.0-current level functionality,
bringing in DHCP support. The only thing I left out were Poul-Henning's newfs changes since I'm not sure if he's brought the rest of that support into -stable yet. If it turns out that this is the case, I'll MFC those changes too.
This commit is contained in:
parent
73a7a67d13
commit
2fdb12ea19
@ -9,7 +9,7 @@ CLEANFILES+= keymap.tmp keymap.h pccard_conf.h
|
||||
|
||||
.PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum
|
||||
|
||||
SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c kget.c \
|
||||
SRCS= anonFTP.c cdrom.c command.c config.c devices.c kget.c \
|
||||
disks.c dispatch.c dist.c dmenu.c doc.c dos.c floppy.c \
|
||||
ftp.c globals.c index.c install.c installUpgrade.c keymap.c \
|
||||
label.c lndir.c main.c makedevs.c media.c menus.c misc.c mouse.c \
|
||||
@ -19,6 +19,7 @@ SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c kget.c \
|
||||
|
||||
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR}
|
||||
CFLAGS+= -I${.CURDIR}/../../sys
|
||||
CFLAGS+= -DUC_PRIVATE -DKERN_NO_SYMBOLS
|
||||
|
||||
PCCARD?= NO
|
||||
|
||||
|
@ -453,7 +453,7 @@ configLinux(dialogMenuItem *self)
|
||||
{
|
||||
variable_set2(VAR_LINUX_ENABLE, "YES", 1);
|
||||
msgNotify("Installing Linux compatibility library...");
|
||||
return package_add("linux_base");
|
||||
return package_add("linux_lib");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -99,16 +99,15 @@ static struct _devname {
|
||||
{ DEVICE_TYPE_NETWORK, "ix", "Intel Etherexpress ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "le", "DEC EtherWorks 2 or 3 ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet (Isolan/Novell NE2100/NE32-VL) ethernet" },
|
||||
{ DEVICE_TYPE_NETWORK, "mx", "Macronix 98713/98715/98725 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "pn", "Lite-On 82168/82169 PNIC PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "sf", "Adaptec AIC-6915 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ste", "Sundance ST201 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "sk", "SysKonnect PCI gigabit ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "mx", "Macronix 98713/98715/98725 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "pn", "Lite-On 82168/82169 PNIC PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "sf", "Adaptec AIC-6915 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "sk", "SysKonnect PCI gigabit ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "tx", "SMC 9432TX ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ti", "Alteon Networks PCI gigabit ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ti", "Alteon Networks PCI gigabit ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "tl", "Texas Instruments ThunderLAN PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "vr", "VIA VT3043/VT86C100A Rhine PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "vr", "VIA VT3043/VT86C100A Rhine PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "vx", "3COM 3c590 / 3c595 ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "wb", "Winbond W89C840F PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "xl", "3COM 3c90x / 3c90xB PCI ethernet card" },
|
||||
|
@ -455,16 +455,20 @@ diskPartition(Device *dev)
|
||||
* disk (i.e., the disklabel starts at sector 0), even in cases where the user has requested
|
||||
* booteasy or a "standard" MBR -- both would be fatal in this case.
|
||||
*/
|
||||
#if 0
|
||||
if ((d->chunks->part->flags & CHUNK_FORCE_ALL) != CHUNK_FORCE_ALL
|
||||
&& (mbrContents = getBootMgr(d->name)) != NULL)
|
||||
Set_Boot_Mgr(d, mbrContents);
|
||||
#else
|
||||
/*
|
||||
* Don't offer to update the MBR on this disk if the first "real" chunk looks like
|
||||
* a FreeBSD "all disk" partition, or the disk is entirely FreeBSD.
|
||||
*/
|
||||
if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1)))
|
||||
mbrContents = getBootMgr(d->name);
|
||||
else
|
||||
mbrContents = NULL;
|
||||
Set_Boot_Mgr(d, mbrContents);
|
||||
|
||||
if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1)) &&
|
||||
(mbrContents = getBootMgr(d->name)) != NULL)
|
||||
Set_Boot_Mgr(d, mbrContents);
|
||||
#endif
|
||||
|
||||
if (DITEM_STATUS(diskPartitionWrite(NULL)) != DITEM_SUCCESS)
|
||||
msgConfirm("Disk partition write returned an error status!");
|
||||
else
|
||||
|
@ -73,7 +73,6 @@ static Distribution DistTable[] = {
|
||||
{ "info", "/", &Dists, DIST_INFO, NULL },
|
||||
{ "src", "/", &Dists, DIST_SRC, SrcDistTable },
|
||||
{ "des", "/", &Dists, DIST_DES, DESDistTable },
|
||||
#ifdef __i386__
|
||||
{ "compat1x", "/", &Dists, DIST_COMPAT1X, NULL },
|
||||
{ "compat20", "/", &Dists, DIST_COMPAT20, NULL },
|
||||
{ "compat21", "/", &Dists, DIST_COMPAT21, NULL },
|
||||
@ -81,9 +80,7 @@ static Distribution DistTable[] = {
|
||||
#if __FreeBSD__ > 3
|
||||
{ "compat3x", "/", &Dists, DIST_COMPAT3X, NULL },
|
||||
#endif
|
||||
#endif
|
||||
{ "ports", "/usr", &Dists, DIST_PORTS, NULL },
|
||||
{ "local", "/", &Dists, DIST_LOCAL, NULL },
|
||||
{ "XF86334", "/usr", &Dists, DIST_XF86, XF86DistTable },
|
||||
{ NULL },
|
||||
};
|
||||
@ -141,7 +138,6 @@ static Distribution XF86DistTable[] = {
|
||||
|
||||
/* The XFree86 server distribution */
|
||||
static Distribution XF86ServerDistTable[] = {
|
||||
#ifdef __i386__
|
||||
{ "PC98-Servers/X9480", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9480, NULL },
|
||||
{ "PC98-Servers/X9EGC", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9EGC, NULL },
|
||||
{ "PC98-Servers/X9GA9", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9GA9, NULL },
|
||||
@ -156,7 +152,6 @@ static Distribution XF86ServerDistTable[] = {
|
||||
{ "PC98-Servers/X9WEP", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9WEP, NULL },
|
||||
{ "PC98-Servers/X9WS", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9WS, NULL },
|
||||
{ "PC98-Servers/X9WSN", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9WSN, NULL },
|
||||
#endif
|
||||
{ "Servers/X3DL", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_3DL, NULL },
|
||||
{ "Servers/X8514", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_8514, NULL },
|
||||
{ "Servers/XAGX", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_AGX, NULL },
|
||||
@ -171,9 +166,6 @@ static Distribution XF86ServerDistTable[] = {
|
||||
{ "Servers/XSVGA", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_SVGA, NULL },
|
||||
{ "Servers/XVG16", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_VGA16, NULL },
|
||||
{ "Servers/XW32", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_W32, NULL },
|
||||
#ifdef __alpha__
|
||||
{ "Servers/XTGA", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_TGA, NULL },
|
||||
#endif
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
@ -208,12 +200,8 @@ distVerifyFlags(void)
|
||||
XF86Dists |= DIST_XF86_SERVER;
|
||||
if (XF86FontDists)
|
||||
XF86Dists |= DIST_XF86_FONTS;
|
||||
if (XF86Dists || XF86ServerDists || XF86FontDists) {
|
||||
if (XF86Dists || XF86ServerDists || XF86FontDists)
|
||||
Dists |= DIST_XF86;
|
||||
#ifdef __i386__
|
||||
Dists |= DIST_COMPAT22; /* For certain old X applications */
|
||||
#endif
|
||||
}
|
||||
if (isDebug())
|
||||
msgDebug("Dist Masks: Dists: %0x, DES: %0x, Srcs: %0x\nXServer: %0x, XFonts: %0x, XDists: %0x\n",
|
||||
Dists, DESDists, SrcDists, XF86ServerDists, XF86FontDists, XF86Dists);
|
||||
|
@ -12,19 +12,16 @@
|
||||
#define DIST_SRC 0x00020
|
||||
#define DIST_DOC 0x00040
|
||||
#define DIST_INFO 0x00080
|
||||
#ifdef __i386__ /* only applicable on x86 */
|
||||
#define DIST_COMPAT1X 0x00100
|
||||
#define DIST_COMPAT20 0x00200
|
||||
#define DIST_COMPAT21 0x00400
|
||||
#define DIST_COMPAT22 0x00800
|
||||
#define DIST_COMPAT3X 0x01000
|
||||
#endif
|
||||
#define DIST_XF86 0x02000
|
||||
#define DIST_DES 0x04000
|
||||
#define DIST_CATPAGES 0x08000
|
||||
#define DIST_PORTS 0x10000
|
||||
#define DIST_LOCAL 0x20000
|
||||
#define DIST_ALL 0x3FFFF
|
||||
#define DIST_ALL 0x1FFFF
|
||||
|
||||
/* Canned distribution sets */
|
||||
#define _DIST_DEVELOPER \
|
||||
@ -76,7 +73,6 @@
|
||||
#define DIST_XF86_CSRC 0x2000
|
||||
#define DIST_XF86_MISC_ALL 0x3FFF
|
||||
#define DIST_XF86_SERVER 0x8000
|
||||
#ifdef __i386__
|
||||
#define DIST_XF86_SERVER_9MGA 0x0000001
|
||||
#define DIST_XF86_SERVER_9480 0x0000002
|
||||
#define DIST_XF86_SERVER_9EGC 0x0000004
|
||||
@ -91,9 +87,6 @@
|
||||
#define DIST_XF86_SERVER_9WEP 0x0000800
|
||||
#define DIST_XF86_SERVER_9WS 0x0001000
|
||||
#define DIST_XF86_SERVER_9WSN 0x0002000
|
||||
#elif __alpha__
|
||||
#define DIST_XF86_SERVER_TGA 0x0000001
|
||||
#endif
|
||||
#define DIST_XF86_SERVER_8514 0x0004000
|
||||
#define DIST_XF86_SERVER_AGX 0x0008000
|
||||
#define DIST_XF86_SERVER_I128 0x0010000
|
||||
|
@ -102,9 +102,7 @@ static char *descrs[] = {
|
||||
"german", "Ported software for Germanic countries.",
|
||||
"graphics", "Graphics libraries and utilities.",
|
||||
"gnome", "Components of the Gnome Desktop environment.",
|
||||
"irc", "Internet Relay Chat utilities.",
|
||||
"japanese", "Ported software for the Japanese market.",
|
||||
"java", "Java language support.",
|
||||
"kde", "Software for the K Desktop Environment.",
|
||||
"korean", "Ported software for the Korean market.",
|
||||
"lang", "Computer languages.",
|
||||
@ -148,7 +146,6 @@ static char *descrs[] = {
|
||||
"x11-clocks", "X Window System based clocks.",
|
||||
"x11-fm", "X Window System based file managers.",
|
||||
"x11-fonts", "X Window System fonts and font utilities.",
|
||||
"x11-servers", "X Window System servers.",
|
||||
"x11-toolkits", "X Window System based development toolkits.",
|
||||
"x11-wm", "X Window System window managers.",
|
||||
NULL, NULL,
|
||||
@ -420,6 +417,7 @@ index_search(PkgNodePtr top, char *str, PkgNodePtr *tp)
|
||||
*tp = top;
|
||||
return p;
|
||||
}
|
||||
|
||||
}
|
||||
else if (p->kids) {
|
||||
/* The usual recursion-out-of-laziness ploy */
|
||||
|
@ -533,7 +533,7 @@ installNovice(dialogMenuItem *self)
|
||||
dialog_clear_norefresh();
|
||||
tmp = tcpDeviceSelect();
|
||||
dialog_clear_norefresh();
|
||||
if (tmp && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (tmp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (!tmp->init(tmp))
|
||||
msgConfirm("Initialization of %s device failed.", tmp->name);
|
||||
}
|
||||
@ -754,8 +754,6 @@ installFixupBin(dialogMenuItem *self)
|
||||
if ((fp = fopen("/boot/loader.conf", "a")) != NULL) {
|
||||
fprintf(fp, "# -- sysinstall generated deltas -- #\n");
|
||||
fprintf(fp, "userconfig_script_load=\"YES\"\n");
|
||||
if (!OnVTY)
|
||||
fprintf(fp, "console=\"serial\"\n");
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
@ -1033,7 +1031,6 @@ installVarDefaults(dialogMenuItem *self)
|
||||
variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE, 0);
|
||||
variable_set2(VAR_INSTALL_ROOT, "/", 0);
|
||||
variable_set2(VAR_INSTALL_CFG, "install.cfg", 0);
|
||||
variable_set2(VAR_TRY_DHCP, "NO", 0); /* For now */
|
||||
cp = getenv("EDITOR");
|
||||
if (!cp)
|
||||
cp = "/usr/bin/ee";
|
||||
@ -1042,14 +1039,13 @@ installVarDefaults(dialogMenuItem *self)
|
||||
variable_set2(VAR_BROWSER_PACKAGE, "lynx", 0);
|
||||
variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx", 0);
|
||||
variable_set2(VAR_FTP_STATE, "passive", 0);
|
||||
variable_set2(VAR_NFS_SECURE, "NO", -1);
|
||||
variable_set2(VAR_NFS_SECURE, "YES", 0);
|
||||
variable_set2(VAR_PKG_TMPDIR, "/usr/tmp", 0);
|
||||
variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT), 0);
|
||||
if (getpid() != 1)
|
||||
variable_set2(SYSTEM_STATE, "update", 0);
|
||||
else
|
||||
variable_set2(SYSTEM_STATE, "init", 0);
|
||||
variable_set2(VAR_NEWFS_ARGS, "-b 8192 -f 1024", 0);
|
||||
return DITEM_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -26,15 +26,6 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifdef __alpha__
|
||||
int
|
||||
kget(char *out)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include "sysinstall.h"
|
||||
#include <sys/sysctl.h>
|
||||
#include <i386/isa/isa_device.h>
|
||||
@ -175,5 +166,3 @@ kget(char *out)
|
||||
fclose(fout);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* !alpha */
|
||||
|
@ -409,8 +409,7 @@ mediaSetFTP(dialogMenuItem *self)
|
||||
return DITEM_FAILURE | what;
|
||||
}
|
||||
}
|
||||
if (isDebug())
|
||||
msgDebug("Found DNS entry for %s successfully..\n", hostname);
|
||||
msgDebug("Found DNS entry for %s successfully..\n", hostname);
|
||||
}
|
||||
variable_set2(VAR_FTP_HOST, hostname, 0);
|
||||
variable_set2(VAR_FTP_DIR, dir ? dir : "/", 0);
|
||||
@ -511,10 +510,8 @@ mediaSetNFS(dialogMenuItem *self)
|
||||
variable_unset(VAR_NFS_PATH);
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
else {
|
||||
if (isDebug())
|
||||
msgDebug("Found DNS entry for %s successfully..", hostname);
|
||||
}
|
||||
else
|
||||
msgDebug("Found DNS entry for %s successfully..", hostname);
|
||||
}
|
||||
variable_set2(VAR_NFS_HOST, hostname, 0);
|
||||
nfsDevice.type = DEVICE_TYPE_NFS;
|
||||
|
@ -254,9 +254,7 @@ DMenu MenuIndex = {
|
||||
{ "Doc, HTML", "The HTML documentation menu.", NULL, docBrowser },
|
||||
{ "Dump Vars", "(debugging) dump out internal variables.", NULL, dump_variables },
|
||||
{ "Emergency shell", "Start an Emergency Holographic shell.", NULL, installFixitHoloShell },
|
||||
#ifdef __i386__
|
||||
{ "Fdisk", "The disk Partition Editor", NULL, diskPartitionEditor },
|
||||
#endif
|
||||
{ "Fixit", "Repair mode with CDROM or fixit floppy.", NULL, dmenuSubmenu, NULL, &MenuFixit },
|
||||
{ "FTP sites", "The FTP mirror site listing.", NULL, dmenuSubmenu, NULL, &MenuMediaFTP },
|
||||
{ "Gateway", "Set flag to route packets between interfaces.", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" },
|
||||
@ -297,9 +295,7 @@ DMenu MenuIndex = {
|
||||
{ "User Management", "Add user and group information.", NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
|
||||
{ "XFree86, Fonts", "XFree86 Font selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
|
||||
{ "XFree86, Server", "XFree86 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer },
|
||||
#ifdef __i386__
|
||||
{ "XFree86, PC98 Server", "XFree86 PC98 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server },
|
||||
#endif
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -432,10 +428,6 @@ DMenu MenuMouse = {
|
||||
DMenu MenuXF86Config = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Please select the XFree86 configuration tool you want to use.",
|
||||
#ifdef __alpha__
|
||||
"Due to problems with the VGA16 server right now, only the\n"
|
||||
"text-mode configuration tool (xf86config) is currently supported.",
|
||||
#else
|
||||
"The first tool, XF86Setup, is fully graphical and requires the\n"
|
||||
"VGA16 server in order to work (should have been selected by\n"
|
||||
"default, but if you de-selected it then you won't be able to\n"
|
||||
@ -443,20 +435,14 @@ DMenu MenuXF86Config = {
|
||||
"a more simplistic shell-script based tool and less friendly to\n"
|
||||
"new users, but it may work in situations where the fancier one\n"
|
||||
"does not.",
|
||||
#endif
|
||||
NULL,
|
||||
NULL,
|
||||
#ifdef __alpha__
|
||||
{ { "xf86config", "Shell-script based XFree86 configuration tool.",
|
||||
NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" },
|
||||
#else
|
||||
{ { "XF86Setup", "Fully graphical XFree86 configuration tool.",
|
||||
NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF86Setup" },
|
||||
{ "xf86config", "Shell-script based XFree86 configuration tool.",
|
||||
NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" },
|
||||
{ "XF98Setup", "Fully graphical XFree86 configuration tool (PC98).",
|
||||
NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF98Setup" },
|
||||
#endif
|
||||
{ "XDesktop", "X already set up, just do desktop configuration.",
|
||||
NULL, dmenuSubmenu, NULL, &MenuXDesktops },
|
||||
{ NULL } },
|
||||
@ -650,8 +636,6 @@ DMenu MenuMediaFTP = {
|
||||
VAR_FTP_PATH _AP("=ftp://ftp3.ru.freebsd.org") },
|
||||
{ "Russia #4", "ftp4.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
|
||||
VAR_FTP_PATH _AP("=ftp://ftp4.ru.freebsd.org") },
|
||||
{ "Slovak Republic", "ftp.sk.freebsd.org", NULL, dmenuSetVariable, NULL,
|
||||
VAR_FTP_PATH _AP("=ftp://ftp.sk.freebsd.org") },
|
||||
{ "South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL,
|
||||
VAR_FTP_PATH _AP("=ftp://ftp.za.freebsd.org") },
|
||||
{ "South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL,
|
||||
@ -804,7 +788,6 @@ DMenu MenuSubDistributions = {
|
||||
NULL,
|
||||
{ { "bin", "Binary base distribution (required)",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BIN },
|
||||
#ifdef __i386__
|
||||
{ "compat1x", "FreeBSD 1.x binary compatibility",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT1X },
|
||||
{ "compat20", "FreeBSD 2.0 binary compatibility",
|
||||
@ -816,7 +799,6 @@ DMenu MenuSubDistributions = {
|
||||
#if __FreeBSD__ > 3
|
||||
{ "compat3x", "FreeBSD 3.x binary compatibility",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT3X },
|
||||
#endif
|
||||
#endif
|
||||
{ "DES", "DES encryption code - NOT FOR EXPORT!",
|
||||
DESFlagCheck, distSetDES },
|
||||
@ -838,8 +820,6 @@ DMenu MenuSubDistributions = {
|
||||
srcFlagCheck, distSetSrc },
|
||||
{ "ports", "The FreeBSD Ports collection",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS },
|
||||
{ "local", "Local additions collection",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LOCAL},
|
||||
{ "XFree86", "The XFree86 3.3.4 distribution",
|
||||
x11FlagCheck, distSetXF86 },
|
||||
{ "All", "All sources, binaries and X Window System binaries",
|
||||
@ -954,10 +934,8 @@ DMenu MenuXF86SelectCore = {
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_HTML },
|
||||
{ "lib", "Data files needed at runtime",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LIB },
|
||||
#ifdef __i386__
|
||||
{ "lk98", "Server link kit for PC98 machines",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT98 },
|
||||
#endif
|
||||
{ "lkit", "Server link kit for all other machines",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT },
|
||||
{ "man", "Manual pages",
|
||||
@ -966,10 +944,8 @@ DMenu MenuXF86SelectCore = {
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PROG },
|
||||
{ "set", "XFree86 Setup Utility",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SET },
|
||||
#ifdef __i386__
|
||||
{ "9set", "XFree86 Setup Utility for PC98 machines",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_9SET },
|
||||
#endif
|
||||
{ "sources", "XFree86 3.3.4 standard sources",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SRC },
|
||||
{ "csources", "XFree86 3.3.4 contrib sources",
|
||||
@ -1050,13 +1026,8 @@ DMenu MenuXF86SelectServer = {
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3V },
|
||||
{ "W32", "8-bit ET4000/W32, /W32i and /W32p cards",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_W32 },
|
||||
#ifdef __i386__
|
||||
{ "PC98", "Select an X server for a NEC PC98 [Submenu]",
|
||||
NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server, '>', ' ', '>', 0 },
|
||||
#elif __alpha__
|
||||
{ "TGA", "TGA cards (alpha architecture only)",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_TGA },
|
||||
#endif
|
||||
{ "All", "Select all of the above",
|
||||
NULL, setX11Servers, NULL, NULL, ' ', ' ', ' ' },
|
||||
{ "Clear", "Reset all of the above",
|
||||
@ -1066,7 +1037,6 @@ DMenu MenuXF86SelectServer = {
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
#ifdef __i386__
|
||||
DMenu MenuXF86SelectPC98Server = {
|
||||
DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"PC98 X Server selection.",
|
||||
@ -1108,7 +1078,6 @@ Mono servers are particularly well-suited to most LCD displays).",
|
||||
checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
|
||||
{ NULL } }
|
||||
};
|
||||
#endif
|
||||
|
||||
DMenu MenuDiskDevices = {
|
||||
DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
|
||||
@ -1208,10 +1177,8 @@ DMenu MenuConfigure = {
|
||||
NULL, dmenuSystemCommand, NULL, "passwd root" },
|
||||
{ "L Label", "The disk Label editor",
|
||||
NULL, diskLabelEditor },
|
||||
#ifdef __i386__
|
||||
{ "F Fdisk", "The disk Slice (PC-style partition) Editor",
|
||||
NULL, diskPartitionEditor },
|
||||
#endif
|
||||
{ "1 User Management", "Add user and group information",
|
||||
NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
|
||||
{ "2 Console", "Customize system console behavior",
|
||||
@ -1383,6 +1350,12 @@ DMenu MenuNTP = {
|
||||
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=YES,ntpdate_flags=ncar.ucar.edu" },
|
||||
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=YES,ntpdate_flags=chantry.hawaii.net" },
|
||||
{ "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=YES,ntpdate_flags=shorty.chpc.utexas.edu" },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
|
@ -123,8 +123,6 @@ mediaInitNetwork(Device *dev)
|
||||
"in the Networking configuration menu before proceeding.", dev->name);
|
||||
return FALSE;
|
||||
}
|
||||
else if (!strcmp(cp, "DHCP"))
|
||||
goto bail;
|
||||
msgNotify("ifconfig %s %s", dev->name, cp);
|
||||
i = vsystem("ifconfig %s %s", dev->name, cp);
|
||||
if (i) {
|
||||
@ -142,7 +140,6 @@ mediaInitNetwork(Device *dev)
|
||||
msgNotify("Adding default route to %s.", rp);
|
||||
vsystem("route -n add default %s", rp);
|
||||
}
|
||||
bail:
|
||||
if (isDebug())
|
||||
msgDebug("Network initialized successfully.\n");
|
||||
networkInitialized = TRUE;
|
||||
@ -330,9 +327,9 @@ startPPP(Device *devp)
|
||||
dialog_clear_norefresh();
|
||||
msgConfirm("NOTICE: The PPP command is now started on VTY2 (type ALT-F3 to\n"
|
||||
"interact with it, ALT-F1 to switch back here). If you are using\n"
|
||||
"a PAP or CHAP login simply enter \"dial\", otherwise you'll need\n"
|
||||
"to use the \"term\" command which starts a terminal emulator\n"
|
||||
"which you can use to talk to your modem and dial the service\n"
|
||||
"a PAP or CHAP login simply enter \"dial\" otherwise you'll need\n"
|
||||
"need to use is the \"term\" command which starts a terminal\n"
|
||||
"emulator you can use to talk to your modem and dial the service\n"
|
||||
"provider. Once you're connected, come back to this screen and\n"
|
||||
"press return.\n\n"
|
||||
"DO NOT PRESS [ENTER] HERE UNTIL THE CONNECTION IS FULLY\n"
|
||||
|
@ -114,8 +114,6 @@ static Option Options[] = {
|
||||
OPT_IS_VAR, NULL, VAR_NO_WARN, varCheck },
|
||||
{ "Yes to All", "Assume \"Yes\" answers to all non-critical dialogs",
|
||||
OPT_IS_VAR, NULL, VAR_NO_CONFIRM, varCheck },
|
||||
{ "DHCP", "Attempt automatic DHCP configuration of interfaces",
|
||||
OPT_IS_VAR, NULL, VAR_TRY_DHCP, varCheck },
|
||||
{ "FTP username", "Username and password to use instead of anonymous",
|
||||
OPT_IS_FUNC, mediaSetFTPUserPass, VAR_FTP_USER, varCheck },
|
||||
{ "Editor", "Which text editor to use during installation",
|
||||
@ -192,17 +190,13 @@ fire(Option opt)
|
||||
}
|
||||
else if (opt.type == OPT_IS_VAR) {
|
||||
if (opt.data) {
|
||||
(void)variable_get_value(opt.aux, opt.data, -1);
|
||||
(void)variable_get_value(opt.aux, opt.data, 1);
|
||||
status = 1;
|
||||
}
|
||||
else if (variable_get(opt.aux)) {
|
||||
if (!variable_cmp(opt.aux, "YES"))
|
||||
variable_set2(opt.aux, "NO", -1);
|
||||
else
|
||||
variable_set2(opt.aux, "YES", -1);
|
||||
}
|
||||
else if (variable_get(opt.aux))
|
||||
variable_unset(opt.aux);
|
||||
else
|
||||
variable_set2(opt.aux, "YES", 0);
|
||||
variable_set2(opt.aux, "YES", 1);
|
||||
}
|
||||
if (opt.check)
|
||||
opt.check(opt);
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
static Boolean sigpipe_caught;
|
||||
static Boolean sigpipe_caught = FALSE;
|
||||
|
||||
static void
|
||||
catch_pipe(int sig)
|
||||
@ -60,14 +60,9 @@ package_add(char *name)
|
||||
|
||||
if (!mediaVerify())
|
||||
return DITEM_FAILURE;
|
||||
|
||||
if (!mediaDevice->init(mediaDevice))
|
||||
return DITEM_FAILURE;
|
||||
|
||||
i = index_initialize("packages/INDEX");
|
||||
if (DITEM_STATUS(i) != DITEM_SUCCESS)
|
||||
return i;
|
||||
|
||||
tmp3 = strpbrk(name, "-") ? NULL : &tmp2;
|
||||
tmp = index_search(&Top, name, tmp3);
|
||||
if (tmp)
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" Copyright (c) 1997
|
||||
.\" Jordan Hubbard <jkh@FreeBSD.org>. All rights reserved.
|
||||
.\" Jordan Hubbard <jkh@freebsd.org>. All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
@ -37,17 +37,11 @@
|
||||
.Op Ar ...
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
is a utility for installing and configuring
|
||||
.Fx
|
||||
systems.
|
||||
It is the first utility invoked by the
|
||||
.Fx
|
||||
installation boot
|
||||
is a utility for installing and configuring FreeBSD systems.
|
||||
It is the first utility invoked by the FreeBSD installation boot
|
||||
floppy and is also copied into
|
||||
.Pa /stand/sysinstall
|
||||
on newly installed
|
||||
.Fx
|
||||
systems for use in later configuring the system.
|
||||
on newly installed FreeBSD systems for use in later configuring the system.
|
||||
.Pp
|
||||
The
|
||||
.Nm
|
||||
@ -69,14 +63,10 @@ the ability to write MBRs and disk labels (through the services
|
||||
of the
|
||||
.Xr libdisk 3
|
||||
library) and install distributions or packages onto new and
|
||||
existing
|
||||
.Fx
|
||||
systems. It also contains some extra intelligence
|
||||
existing FreeBSD systems. It also contains some extra intelligence
|
||||
for running as a replacement for
|
||||
.Xr init 8
|
||||
when it's invoked by the
|
||||
.Fx
|
||||
installation boot procedure. It
|
||||
when it's invoked by the FreeBSD installation boot procedure. It
|
||||
assumes very little in the way of additional utility support and
|
||||
performs most file system operations by calling the relevant syscalls
|
||||
(such as
|
||||
@ -89,12 +79,11 @@ currently uses the
|
||||
library to do user interaction with simple ANSI line graphics, color
|
||||
support for which is enabled by either running on a syscons VTY or some
|
||||
other color-capable terminal emulator (newer versions of xterm will support
|
||||
color when using the
|
||||
.Dq xterm-color
|
||||
termcap entry).
|
||||
color when using the ``xterm-color'' termcap entry).
|
||||
.Pp
|
||||
This product is currently at the end of its life cycle and will
|
||||
eventually be replaced.
|
||||
utility.
|
||||
.Sh RUNNING SCRIPTS
|
||||
.Nm
|
||||
may be either driven interactively through its various internal menus
|
||||
@ -135,7 +124,7 @@ directive), upon reaching the end of the argument list or on error.
|
||||
For example:
|
||||
.nf
|
||||
|
||||
/stand/sysinstall _ftpPath=ftp://ziggy/pub/ mediaSetFTP configPackages
|
||||
/stand/sysinstall _ftpPath=ftp:/ziggy/pub/ mediaSetFTP configPackages
|
||||
|
||||
.fi
|
||||
Would initialize
|
||||
@ -189,11 +178,7 @@ loading any required 3rd-party routing daemons as necessary.
|
||||
.Bl -tag -width indent
|
||||
.It router
|
||||
can be set to the name of the desired routing daemon,
|
||||
e.g.
|
||||
.Dq routed
|
||||
or
|
||||
.Dq gated ,
|
||||
otherwise it is prompted for.
|
||||
e.g. ``routed'' or ``gated'', otherwise it is prompted for.
|
||||
.El
|
||||
.It configNFSServer
|
||||
Configure host as an NFS server.
|
||||
@ -241,27 +226,18 @@ change to geometry.
|
||||
.It partition
|
||||
Set to disk partitioning type or size, its value being
|
||||
.Ar free
|
||||
in order to use only remaining free space for
|
||||
.Fx ,
|
||||
in order to use only remaining free space for FreeBSD,
|
||||
.Ar all
|
||||
to use the entire disk for
|
||||
.Fx
|
||||
but maintain a proper partition
|
||||
to use the entire disk for FreeBSD but maintain a proper partition
|
||||
table,
|
||||
.Ar existing
|
||||
to use an existing
|
||||
.Fx
|
||||
partition (first found),
|
||||
to use an existing FreeBSD partition (first found),
|
||||
.Ar exclusive
|
||||
to use the disk in
|
||||
.Dq dangerously dedicated
|
||||
mode or, finally,
|
||||
to use the disk in ``dangerously dedicated'' mode or, finally,
|
||||
.Ar somenumber
|
||||
to allocate
|
||||
.Ar somenumber
|
||||
blocks of available free space to a new
|
||||
.Fx
|
||||
partition.
|
||||
blocks of available free space to a new FreeBSD partition.
|
||||
Default: Interactive mode.
|
||||
.It bootManager
|
||||
is set to one of
|
||||
@ -286,8 +262,7 @@ function) to be written out.
|
||||
\fBVariables:\fR None
|
||||
.It diskLabelEditor
|
||||
Invokes the disk label editor. This is a bit trickier from a script
|
||||
since you need to essentially label everything inside each
|
||||
.Fx
|
||||
since you need to essentially label everything inside each FreeBSD
|
||||
(type 0xA5) partition created by the
|
||||
.Ar diskPartitionEditor
|
||||
function, and that requires knowing a few rules about how things are
|
||||
@ -298,20 +273,15 @@ what the slice names will be, then and only then hardwiring them into
|
||||
the script.
|
||||
.Pp
|
||||
For example, let's say you have a SCSI disk on which you've created a new
|
||||
.Fx
|
||||
partition in slice 2 (your DOS partition residing in slice 1).
|
||||
FreeBSD partition in slice 2 (your DOS partition residing in slice 1).
|
||||
The slice name would be
|
||||
.Ar da0s2
|
||||
for the whole
|
||||
.Fx
|
||||
partition
|
||||
.Ar ( da0s1
|
||||
for the whole FreeBSD partition (
|
||||
.Ar da0s1
|
||||
being your DOS primary
|
||||
partition). Now let's further assume that you have 500MB in this
|
||||
partition and you want to sub-partition that space into root, swap,
|
||||
var and usr file systems for
|
||||
.Fx .
|
||||
Your invocation of the
|
||||
var and usr file systems for FreeBSD. Your invocation of the
|
||||
.Ar diskLabelEditor
|
||||
function might involve setting the following variables:
|
||||
.Bl -tag -width findx
|
||||
@ -366,12 +336,11 @@ Resets all selected distributions to the empty set (no distributions selected).
|
||||
.It distSetCustom
|
||||
Allows the selection of a custom distribution set (e.g. not just on of the
|
||||
existing "canned" sets) with no user interaction.
|
||||
|
||||
\fBVariables:\fR
|
||||
.Bl -tag -width indent
|
||||
.It dists
|
||||
List of distributions to load. Possible distribution values are:
|
||||
.Bl -tag -width indentxx
|
||||
.Bl -tag -width indent
|
||||
.It Li bin
|
||||
The base binary distribution.
|
||||
.It Li doc
|
||||
@ -391,31 +360,19 @@ GNU info files and other extra docs.
|
||||
.It Li des
|
||||
DES encryption binaries and libraries.
|
||||
.It Li compat1x
|
||||
Compatibility with
|
||||
.It Li 1.x
|
||||
Compatibility with FreeBSD 1.x
|
||||
.It Li compat20
|
||||
Compatibility with
|
||||
.Fx 2.0
|
||||
Compatibility with FreeBSD 2.0
|
||||
.It Li compat21
|
||||
Compatibility with
|
||||
.Fx 2.1
|
||||
.It Li compat22
|
||||
.Fx 2.2
|
||||
and
|
||||
.Fx 3.0
|
||||
a.out binary compatibility
|
||||
.It Li compat3x
|
||||
Compatibility with
|
||||
.It Li 3.x
|
||||
(available for
|
||||
.Fx 4.0
|
||||
systems only)
|
||||
Compatibility with FreeBSD 2.1
|
||||
.It Li ports
|
||||
The ports collection.
|
||||
.It Li krb
|
||||
Kerberos binaries.
|
||||
.It Li ssecure
|
||||
/usr/src/secure
|
||||
.It Li sebones
|
||||
/usr/src/eBones
|
||||
.It Li sbase
|
||||
/usr/src/[top level files]
|
||||
.It Li scontrib
|
||||
@ -524,8 +481,6 @@ XFree86 3.3.4 SVGA server.
|
||||
XFree86 3.3.4 VGA16 server.
|
||||
.It Li XW32
|
||||
XFree86 3.3.4 ET4000/W32, /W32i and /W32p server.
|
||||
.It Li XTGA
|
||||
Server for TGA cards (alpha architecture only).
|
||||
.It Li Xnest
|
||||
XFree86 3.3.4 nested X server.
|
||||
.It Li Xvfb
|
||||
@ -607,7 +562,6 @@ variable). Defaults to lynx.
|
||||
Commit any and all pending changes to disk. This function
|
||||
is essentially shorthand for a number of more granular "commit"
|
||||
functions.
|
||||
.Pp
|
||||
\fBVariables:\fR None
|
||||
.It installExpress
|
||||
Start an "express" installation, asking few questions of
|
||||
@ -657,9 +611,7 @@ configuration file from another.
|
||||
The fully pathname of the file to load.
|
||||
.El
|
||||
.It mediaSetCDROM
|
||||
Select a
|
||||
.Fx
|
||||
CDROM as the installation media.
|
||||
Select a FreeBSD CDROM as the installation media.
|
||||
.Pp
|
||||
\fBVariables:\fR None
|
||||
.It mediaSetFloppy
|
||||
@ -687,8 +639,8 @@ The domain name of the host being installed (optional).
|
||||
.It defaultrouter
|
||||
The default router for this host (non-optional).
|
||||
.It netDev
|
||||
Which host interface to use
|
||||
.Ar ( ed0
|
||||
Which host interface to use (
|
||||
.Ar ed0
|
||||
or
|
||||
.Ar ep0 ,
|
||||
for example. Non-optional).
|
||||
@ -700,10 +652,9 @@ The IP address for the selected host interface (non-optional).
|
||||
.It netmask
|
||||
The netmask for the selected host interface (non-optional).
|
||||
.It _ftpPath
|
||||
The fully qualified URL of the FTP site containing the
|
||||
.Fx
|
||||
The fully qualified URL of the FTP site containing the FreeBSD
|
||||
distribution you're interested in, e.g.
|
||||
.Ar ftp://ftp.FreeBSD.org/pub/FreeBSD/ .
|
||||
.Ar ftp://ftp.freebsd.org/pub/FreeBSD/ .
|
||||
.El
|
||||
.It mediaSetFTPActive
|
||||
Alias for
|
||||
@ -726,9 +677,7 @@ the installation media.
|
||||
\fBVariables:\fR
|
||||
.Bl -tag -width indent
|
||||
.It ufs
|
||||
full /path to directory containing the
|
||||
.Fx
|
||||
distribution you're
|
||||
full /path to directory containing the FreeBSD distribution you're
|
||||
interested in.
|
||||
.El
|
||||
.It mediaSetNFS
|
||||
@ -742,8 +691,8 @@ The domain name of the host being installed (optional).
|
||||
.It defaultrouter
|
||||
The default router for this host (non-optional).
|
||||
.It netDev
|
||||
Which host interface to use
|
||||
.Ar ( ed0
|
||||
Which host interface to use (
|
||||
.Ar ed0
|
||||
or
|
||||
.Ar ep0 ,
|
||||
for example. Non-optional).
|
||||
@ -756,9 +705,7 @@ The IP address for the selected host interface (non-optional).
|
||||
The netmask for the selected host interface (non-optional).
|
||||
.It nfs
|
||||
full hostname:/path specification for directory containing
|
||||
the
|
||||
.Fx
|
||||
distribution you're interested in.
|
||||
the FreeBSD distribution you're interested in.
|
||||
.El
|
||||
.It mediaSetFTPUserPass
|
||||
.Pp
|
||||
|
@ -160,7 +160,6 @@
|
||||
#define VAR_SLOW_ETHER "slowEthernetCard"
|
||||
#define VAR_SWAP_SIZE "swapSize"
|
||||
#define VAR_TAPE_BLOCKSIZE "tapeBlocksize"
|
||||
#define VAR_TRY_DHCP "tryDHCP"
|
||||
#define VAR_UFS_PATH "ufs"
|
||||
#define VAR_USR_SIZE "usrSize"
|
||||
#define VAR_VAR_SIZE "varSize"
|
||||
@ -319,7 +318,6 @@ typedef int (*commandFunc)(char *key, void *data);
|
||||
|
||||
/* This is the structure that Network devices carry around in their private, erm, structures */
|
||||
typedef struct _devPriv {
|
||||
int use_dhcp;
|
||||
char ipaddr[IPADDR_FIELD_LEN];
|
||||
char netmask[IPADDR_FIELD_LEN];
|
||||
char extras[EXTRAS_FIELD_LEN];
|
||||
@ -453,10 +451,6 @@ extern Boolean dummyInit(Device *dev);
|
||||
extern FILE *dummyGet(Device *dev, char *dist, Boolean probe);
|
||||
extern void dummyShutdown(Device *dev);
|
||||
|
||||
/* dhcp.c */
|
||||
extern int dhcpParseLeases(char *file, char *hostname, char *domain, char *nameserver,
|
||||
char *ipaddr, char *gateway, char *netmask);
|
||||
|
||||
/* disks.c */
|
||||
extern int diskPartitionEditor(dialogMenuItem *self);
|
||||
extern int diskPartitionWrite(dialogMenuItem *self);
|
||||
|
@ -71,9 +71,7 @@ expand(char *fname)
|
||||
void
|
||||
systemInitialize(int argc, char **argv)
|
||||
{
|
||||
#ifdef __alpha__
|
||||
int i;
|
||||
#endif
|
||||
|
||||
signal(SIGINT, SIG_IGN);
|
||||
globalsInit();
|
||||
@ -111,15 +109,11 @@ systemInitialize(int argc, char **argv)
|
||||
close(1); dup(0);
|
||||
close(2); dup(0);
|
||||
printf("%s running as init on %s\n", argv[0], OnVTY ? "vty0" : "serial console");
|
||||
ioctl(0, TIOCSCTTY, (char *)NULL);
|
||||
i = ioctl(0, TIOCSCTTY, (char *)NULL);
|
||||
setlogin("root");
|
||||
setenv("PATH", "/stand:/bin:/sbin:/usr/sbin:/usr/bin:/mnt/bin:/mnt/sbin:/mnt/usr/sbin:/mnt/usr/bin:/usr/X11R6/bin", 1);
|
||||
setbuf(stdin, 0);
|
||||
setbuf(stderr, 0);
|
||||
#ifdef __alpha__
|
||||
i = 0;
|
||||
sysctlbyname("machdep.unaligned_print", NULL, 0, &i, sizeof(i));
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
char hname[256];
|
||||
@ -353,7 +347,7 @@ systemCreateHoloshell(void)
|
||||
if (kill(ehs_pid, 0) == 0) {
|
||||
|
||||
if (msgYesNo("There seems to be an emergency holographic shell\n"
|
||||
"already running on VTY 4.\n\n"
|
||||
"already running on VTY 4.\n"
|
||||
"Kill it and start a new one?"))
|
||||
return;
|
||||
|
||||
|
@ -39,7 +39,6 @@
|
||||
|
||||
#include "sysinstall.h"
|
||||
#include <sys/param.h>
|
||||
#include <netdb.h>
|
||||
|
||||
/* The help file for the TCP/IP setup screen */
|
||||
#define TCP_HELPFILE "tcp"
|
||||
@ -146,53 +145,6 @@ verifySettings(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
dhcpGetInfo(Device *devp)
|
||||
{
|
||||
/* If it fails, do it the old-fashioned way */
|
||||
if (dhcpParseLeases("/var/db/dhclient.leases", hostname, domainname,
|
||||
nameserver, ipaddr, gateway, netmask) == -1) {
|
||||
FILE *ifp;
|
||||
char *cp, cmd[256], data[2048];
|
||||
int i, j;
|
||||
|
||||
/* Bah, now we have to kludge getting the information from ifconfig */
|
||||
snprintf(cmd, sizeof cmd, "ifconfig %s", devp->name);
|
||||
ifp = popen(cmd, "r");
|
||||
if (ifp) {
|
||||
j = fread(data, 1, sizeof(data), ifp);
|
||||
fclose(ifp);
|
||||
if (j < 0) /* paranoia */
|
||||
j = 0;
|
||||
data[j] = '\0';
|
||||
if (isDebug())
|
||||
msgDebug("DHCP configured interface returns %s\n", data);
|
||||
/* XXX This is gross as it assumes a certain ordering to
|
||||
ifconfig's output! XXX */
|
||||
if ((cp = strstr(data, "inet")) != NULL) {
|
||||
i = 0;
|
||||
cp += 5; /* move over keyword */
|
||||
while (*cp != ' ')
|
||||
ipaddr[i++] = *(cp++);
|
||||
ipaddr[i] = '\0';
|
||||
if (!strncmp(++cp, "netmask", 7)) {
|
||||
i = 0;
|
||||
cp += 8;
|
||||
while (*cp != ' ')
|
||||
netmask[i++] = *(cp++);
|
||||
netmask[i] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If we didn't get a name server value, hunt for it in resolv.conf */
|
||||
if (!nameserver[0] && file_readable("/etc/resolv.conf"))
|
||||
configEnvironmentResolv("/etc/resolv.conf");
|
||||
if (hostname[0])
|
||||
variable_set2(VAR_HOSTNAME, hostname, 0);
|
||||
}
|
||||
|
||||
/* This is it - how to get TCP setup values */
|
||||
int
|
||||
tcpOpenDialog(Device *devp)
|
||||
@ -201,7 +153,6 @@ tcpOpenDialog(Device *devp)
|
||||
ComposeObj *obj = NULL;
|
||||
int n = 0, filled = 0, cancel = FALSE;
|
||||
int max, ret = DITEM_SUCCESS;
|
||||
int use_dhcp = FALSE;
|
||||
char *tmp;
|
||||
char title[80];
|
||||
|
||||
@ -212,46 +163,22 @@ tcpOpenDialog(Device *devp)
|
||||
SAFE_STRCPY(ipaddr, di->ipaddr);
|
||||
SAFE_STRCPY(netmask, di->netmask);
|
||||
SAFE_STRCPY(extras, di->extras);
|
||||
use_dhcp = di->use_dhcp;
|
||||
}
|
||||
else { /* See if there are any defaults */
|
||||
char *cp;
|
||||
|
||||
/* First try a DHCP scan if such behavior is desired */
|
||||
if (!variable_cmp(VAR_TRY_DHCP, "YES") || !msgYesNo("Do you want to try DHCP configuration of the interface?")) {
|
||||
int k;
|
||||
|
||||
Mkdir("/var/db");
|
||||
Mkdir("/var/run");
|
||||
Mkdir("/tmp");
|
||||
msgNotify("Scanning for DHCP servers...");
|
||||
for (k = 1; k < 4; k++) {
|
||||
if (0 == vsystem("dhclient -1 %s", devp->name)) {
|
||||
dhcpGetInfo(devp);
|
||||
use_dhcp = TRUE;
|
||||
break;
|
||||
}
|
||||
msgNotify("Scanning for DHCP servers... Retry: %d", k);
|
||||
}
|
||||
}
|
||||
|
||||
/* Get old IP address from variable space, if available */
|
||||
if (!ipaddr[0]) {
|
||||
if ((cp = variable_get(VAR_IPADDR)) != NULL)
|
||||
SAFE_STRCPY(ipaddr, cp);
|
||||
else if ((cp = variable_get(string_concat3(devp->name, "_", VAR_IPADDR))) != NULL)
|
||||
SAFE_STRCPY(ipaddr, cp);
|
||||
}
|
||||
|
||||
/* Get old netmask from variable space, if available */
|
||||
if (!netmask[0]) {
|
||||
if ((cp = variable_get(VAR_NETMASK)) != NULL)
|
||||
SAFE_STRCPY(netmask, cp);
|
||||
else if ((cp = variable_get(string_concat3(devp->name, "_", VAR_NETMASK))) != NULL)
|
||||
SAFE_STRCPY(netmask, cp);
|
||||
}
|
||||
|
||||
/* Get old extras string from variable space, if available */
|
||||
if (!extras[0]) {
|
||||
if ((cp = variable_get(VAR_EXTRAS)) != NULL)
|
||||
SAFE_STRCPY(extras, cp);
|
||||
@ -261,26 +188,26 @@ tcpOpenDialog(Device *devp)
|
||||
}
|
||||
|
||||
/* Look up values already recorded with the system, or blank the string variables ready to accept some new data */
|
||||
if (!hostname[0]) {
|
||||
tmp = variable_get(VAR_HOSTNAME);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(hostname, tmp);
|
||||
}
|
||||
if (!domainname[0]) {
|
||||
tmp = variable_get(VAR_DOMAINNAME);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(domainname, tmp);
|
||||
}
|
||||
if (!gateway[0]) {
|
||||
tmp = variable_get(VAR_GATEWAY);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(gateway, tmp);
|
||||
}
|
||||
if (!nameserver[0]) {
|
||||
tmp = variable_get(VAR_NAMESERVER);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(nameserver, tmp);
|
||||
}
|
||||
tmp = variable_get(VAR_HOSTNAME);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(hostname, tmp);
|
||||
else
|
||||
bzero(hostname, sizeof(hostname));
|
||||
tmp = variable_get(VAR_DOMAINNAME);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(domainname, tmp);
|
||||
else
|
||||
bzero(domainname, sizeof(domainname));
|
||||
tmp = variable_get(VAR_GATEWAY);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(gateway, tmp);
|
||||
else
|
||||
bzero(gateway, sizeof(gateway));
|
||||
tmp = variable_get(VAR_NAMESERVER);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(nameserver, tmp);
|
||||
else
|
||||
bzero(nameserver, sizeof(nameserver));
|
||||
|
||||
save = savescr();
|
||||
/* If non-interactive, jump straight over the dialog crap and into config section */
|
||||
@ -325,7 +252,7 @@ tcpOpenDialog(Device *devp)
|
||||
* the most appropriate one (entire class C, or subnetted
|
||||
* class A/B network).
|
||||
*/
|
||||
if (!netmask[0]) {
|
||||
if (netmask[0] == '\0') {
|
||||
strcpy(netmask, "255.255.255.0");
|
||||
RefreshStringObj(layout[LAYOUT_NETMASK].obj);
|
||||
++filled;
|
||||
@ -361,18 +288,14 @@ tcpOpenDialog(Device *devp)
|
||||
char temp[512], ifn[255];
|
||||
char *ifaces;
|
||||
|
||||
if (hostname[0]) {
|
||||
variable_set2(VAR_HOSTNAME, hostname, use_dhcp ? 0 : 1);
|
||||
sethostname(hostname, strlen(hostname));
|
||||
}
|
||||
variable_set2(VAR_HOSTNAME, hostname, 1);
|
||||
sethostname(hostname, strlen(hostname));
|
||||
if (domainname[0])
|
||||
variable_set2(VAR_DOMAINNAME, domainname, 0);
|
||||
if (gateway[0])
|
||||
variable_set2(VAR_GATEWAY, gateway, use_dhcp ? 0 : 1);
|
||||
variable_set2(VAR_GATEWAY, gateway, 1);
|
||||
if (nameserver[0])
|
||||
variable_set2(VAR_NAMESERVER, nameserver, 0);
|
||||
if (ipaddr[0])
|
||||
variable_set2(VAR_IPADDR, ipaddr, 0);
|
||||
|
||||
if (!devp->private)
|
||||
devp->private = (DevInfo *)safe_malloc(sizeof(DevInfo));
|
||||
@ -380,13 +303,9 @@ tcpOpenDialog(Device *devp)
|
||||
SAFE_STRCPY(di->ipaddr, ipaddr);
|
||||
SAFE_STRCPY(di->netmask, netmask);
|
||||
SAFE_STRCPY(di->extras, extras);
|
||||
di->use_dhcp = use_dhcp;
|
||||
|
||||
sprintf(temp, "inet %s %s netmask %s", ipaddr, extras, netmask);
|
||||
sprintf(ifn, "%s%s", VAR_IFCONFIG, devp->name);
|
||||
if (use_dhcp)
|
||||
sprintf(temp, "DHCP");
|
||||
else
|
||||
sprintf(temp, "inet %s %s netmask %s", ipaddr, extras, netmask);
|
||||
variable_set2(ifn, temp, 1);
|
||||
ifaces = variable_get(VAR_INTERFACES);
|
||||
if (!ifaces)
|
||||
@ -396,8 +315,9 @@ tcpOpenDialog(Device *devp)
|
||||
sprintf(ifn, "%s %s", devp->name, ifaces);
|
||||
variable_set2(VAR_INTERFACES, ifn, 1);
|
||||
}
|
||||
if (!use_dhcp)
|
||||
configResolv(NULL); /* XXX this will do it on the MFS copy XXX */
|
||||
if (ipaddr[0])
|
||||
variable_set2(VAR_IPADDR, ipaddr, 0);
|
||||
configResolv(NULL); /* XXX this will do it on the MFS copy XXX */
|
||||
ret = DITEM_SUCCESS;
|
||||
}
|
||||
else
|
||||
@ -476,7 +396,7 @@ tcpMenuSelect(dialogMenuItem *self)
|
||||
Device *tmp;
|
||||
|
||||
tmp = tcpDeviceSelect();
|
||||
if (tmp && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (tmp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (!tmp->init(tmp))
|
||||
msgConfirm("Initialization of %s device failed.", tmp->name);
|
||||
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||
|
@ -58,8 +58,7 @@ make_variable(char *var, char *value, int dirty)
|
||||
setenv(var, value, 1);
|
||||
free(vp->value);
|
||||
vp->value = strdup(value);
|
||||
if (dirty != -1)
|
||||
vp->dirty = dirty;
|
||||
vp->dirty = dirty;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -69,8 +68,6 @@ make_variable(char *var, char *value, int dirty)
|
||||
vp = (Variable *)safe_malloc(sizeof(Variable));
|
||||
vp->name = strdup(var);
|
||||
vp->value = strdup(value);
|
||||
if (dirty == -1)
|
||||
dirty = 0;
|
||||
vp->dirty = dirty;
|
||||
vp->next = VarHead;
|
||||
VarHead = vp;
|
||||
|
@ -9,7 +9,7 @@ CLEANFILES+= keymap.tmp keymap.h pccard_conf.h
|
||||
|
||||
.PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum
|
||||
|
||||
SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c kget.c \
|
||||
SRCS= anonFTP.c cdrom.c command.c config.c devices.c kget.c \
|
||||
disks.c dispatch.c dist.c dmenu.c doc.c dos.c floppy.c \
|
||||
ftp.c globals.c index.c install.c installUpgrade.c keymap.c \
|
||||
label.c lndir.c main.c makedevs.c media.c menus.c misc.c mouse.c \
|
||||
@ -19,6 +19,7 @@ SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c kget.c \
|
||||
|
||||
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR}
|
||||
CFLAGS+= -I${.CURDIR}/../../sys
|
||||
CFLAGS+= -DUC_PRIVATE -DKERN_NO_SYMBOLS
|
||||
|
||||
PCCARD?= NO
|
||||
|
||||
|
@ -453,7 +453,7 @@ configLinux(dialogMenuItem *self)
|
||||
{
|
||||
variable_set2(VAR_LINUX_ENABLE, "YES", 1);
|
||||
msgNotify("Installing Linux compatibility library...");
|
||||
return package_add("linux_base");
|
||||
return package_add("linux_lib");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -99,16 +99,15 @@ static struct _devname {
|
||||
{ DEVICE_TYPE_NETWORK, "ix", "Intel Etherexpress ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "le", "DEC EtherWorks 2 or 3 ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet (Isolan/Novell NE2100/NE32-VL) ethernet" },
|
||||
{ DEVICE_TYPE_NETWORK, "mx", "Macronix 98713/98715/98725 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "pn", "Lite-On 82168/82169 PNIC PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "sf", "Adaptec AIC-6915 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ste", "Sundance ST201 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "sk", "SysKonnect PCI gigabit ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "mx", "Macronix 98713/98715/98725 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "pn", "Lite-On 82168/82169 PNIC PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "sf", "Adaptec AIC-6915 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "sk", "SysKonnect PCI gigabit ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "tx", "SMC 9432TX ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ti", "Alteon Networks PCI gigabit ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ti", "Alteon Networks PCI gigabit ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "tl", "Texas Instruments ThunderLAN PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "vr", "VIA VT3043/VT86C100A Rhine PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "vr", "VIA VT3043/VT86C100A Rhine PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "vx", "3COM 3c590 / 3c595 ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "wb", "Winbond W89C840F PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "xl", "3COM 3c90x / 3c90xB PCI ethernet card" },
|
||||
|
@ -455,16 +455,20 @@ diskPartition(Device *dev)
|
||||
* disk (i.e., the disklabel starts at sector 0), even in cases where the user has requested
|
||||
* booteasy or a "standard" MBR -- both would be fatal in this case.
|
||||
*/
|
||||
#if 0
|
||||
if ((d->chunks->part->flags & CHUNK_FORCE_ALL) != CHUNK_FORCE_ALL
|
||||
&& (mbrContents = getBootMgr(d->name)) != NULL)
|
||||
Set_Boot_Mgr(d, mbrContents);
|
||||
#else
|
||||
/*
|
||||
* Don't offer to update the MBR on this disk if the first "real" chunk looks like
|
||||
* a FreeBSD "all disk" partition, or the disk is entirely FreeBSD.
|
||||
*/
|
||||
if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1)))
|
||||
mbrContents = getBootMgr(d->name);
|
||||
else
|
||||
mbrContents = NULL;
|
||||
Set_Boot_Mgr(d, mbrContents);
|
||||
|
||||
if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1)) &&
|
||||
(mbrContents = getBootMgr(d->name)) != NULL)
|
||||
Set_Boot_Mgr(d, mbrContents);
|
||||
#endif
|
||||
|
||||
if (DITEM_STATUS(diskPartitionWrite(NULL)) != DITEM_SUCCESS)
|
||||
msgConfirm("Disk partition write returned an error status!");
|
||||
else
|
||||
|
@ -533,7 +533,7 @@ installNovice(dialogMenuItem *self)
|
||||
dialog_clear_norefresh();
|
||||
tmp = tcpDeviceSelect();
|
||||
dialog_clear_norefresh();
|
||||
if (tmp && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (tmp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (!tmp->init(tmp))
|
||||
msgConfirm("Initialization of %s device failed.", tmp->name);
|
||||
}
|
||||
@ -754,8 +754,6 @@ installFixupBin(dialogMenuItem *self)
|
||||
if ((fp = fopen("/boot/loader.conf", "a")) != NULL) {
|
||||
fprintf(fp, "# -- sysinstall generated deltas -- #\n");
|
||||
fprintf(fp, "userconfig_script_load=\"YES\"\n");
|
||||
if (!OnVTY)
|
||||
fprintf(fp, "console=\"serial\"\n");
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
@ -1033,7 +1031,6 @@ installVarDefaults(dialogMenuItem *self)
|
||||
variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE, 0);
|
||||
variable_set2(VAR_INSTALL_ROOT, "/", 0);
|
||||
variable_set2(VAR_INSTALL_CFG, "install.cfg", 0);
|
||||
variable_set2(VAR_TRY_DHCP, "NO", 0); /* For now */
|
||||
cp = getenv("EDITOR");
|
||||
if (!cp)
|
||||
cp = "/usr/bin/ee";
|
||||
@ -1042,14 +1039,13 @@ installVarDefaults(dialogMenuItem *self)
|
||||
variable_set2(VAR_BROWSER_PACKAGE, "lynx", 0);
|
||||
variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx", 0);
|
||||
variable_set2(VAR_FTP_STATE, "passive", 0);
|
||||
variable_set2(VAR_NFS_SECURE, "NO", -1);
|
||||
variable_set2(VAR_NFS_SECURE, "YES", 0);
|
||||
variable_set2(VAR_PKG_TMPDIR, "/usr/tmp", 0);
|
||||
variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT), 0);
|
||||
if (getpid() != 1)
|
||||
variable_set2(SYSTEM_STATE, "update", 0);
|
||||
else
|
||||
variable_set2(SYSTEM_STATE, "init", 0);
|
||||
variable_set2(VAR_NEWFS_ARGS, "-b 8192 -f 1024", 0);
|
||||
return DITEM_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -254,9 +254,7 @@ DMenu MenuIndex = {
|
||||
{ "Doc, HTML", "The HTML documentation menu.", NULL, docBrowser },
|
||||
{ "Dump Vars", "(debugging) dump out internal variables.", NULL, dump_variables },
|
||||
{ "Emergency shell", "Start an Emergency Holographic shell.", NULL, installFixitHoloShell },
|
||||
#ifdef __i386__
|
||||
{ "Fdisk", "The disk Partition Editor", NULL, diskPartitionEditor },
|
||||
#endif
|
||||
{ "Fixit", "Repair mode with CDROM or fixit floppy.", NULL, dmenuSubmenu, NULL, &MenuFixit },
|
||||
{ "FTP sites", "The FTP mirror site listing.", NULL, dmenuSubmenu, NULL, &MenuMediaFTP },
|
||||
{ "Gateway", "Set flag to route packets between interfaces.", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" },
|
||||
@ -297,9 +295,7 @@ DMenu MenuIndex = {
|
||||
{ "User Management", "Add user and group information.", NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
|
||||
{ "XFree86, Fonts", "XFree86 Font selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
|
||||
{ "XFree86, Server", "XFree86 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer },
|
||||
#ifdef __i386__
|
||||
{ "XFree86, PC98 Server", "XFree86 PC98 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server },
|
||||
#endif
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -432,10 +428,6 @@ DMenu MenuMouse = {
|
||||
DMenu MenuXF86Config = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Please select the XFree86 configuration tool you want to use.",
|
||||
#ifdef __alpha__
|
||||
"Due to problems with the VGA16 server right now, only the\n"
|
||||
"text-mode configuration tool (xf86config) is currently supported.",
|
||||
#else
|
||||
"The first tool, XF86Setup, is fully graphical and requires the\n"
|
||||
"VGA16 server in order to work (should have been selected by\n"
|
||||
"default, but if you de-selected it then you won't be able to\n"
|
||||
@ -443,20 +435,14 @@ DMenu MenuXF86Config = {
|
||||
"a more simplistic shell-script based tool and less friendly to\n"
|
||||
"new users, but it may work in situations where the fancier one\n"
|
||||
"does not.",
|
||||
#endif
|
||||
NULL,
|
||||
NULL,
|
||||
#ifdef __alpha__
|
||||
{ { "xf86config", "Shell-script based XFree86 configuration tool.",
|
||||
NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" },
|
||||
#else
|
||||
{ { "XF86Setup", "Fully graphical XFree86 configuration tool.",
|
||||
NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF86Setup" },
|
||||
{ "xf86config", "Shell-script based XFree86 configuration tool.",
|
||||
NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" },
|
||||
{ "XF98Setup", "Fully graphical XFree86 configuration tool (PC98).",
|
||||
NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF98Setup" },
|
||||
#endif
|
||||
{ "XDesktop", "X already set up, just do desktop configuration.",
|
||||
NULL, dmenuSubmenu, NULL, &MenuXDesktops },
|
||||
{ NULL } },
|
||||
@ -650,8 +636,6 @@ DMenu MenuMediaFTP = {
|
||||
VAR_FTP_PATH _AP("=ftp://ftp3.ru.freebsd.org") },
|
||||
{ "Russia #4", "ftp4.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
|
||||
VAR_FTP_PATH _AP("=ftp://ftp4.ru.freebsd.org") },
|
||||
{ "Slovak Republic", "ftp.sk.freebsd.org", NULL, dmenuSetVariable, NULL,
|
||||
VAR_FTP_PATH _AP("=ftp://ftp.sk.freebsd.org") },
|
||||
{ "South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL,
|
||||
VAR_FTP_PATH _AP("=ftp://ftp.za.freebsd.org") },
|
||||
{ "South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL,
|
||||
@ -804,7 +788,6 @@ DMenu MenuSubDistributions = {
|
||||
NULL,
|
||||
{ { "bin", "Binary base distribution (required)",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BIN },
|
||||
#ifdef __i386__
|
||||
{ "compat1x", "FreeBSD 1.x binary compatibility",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT1X },
|
||||
{ "compat20", "FreeBSD 2.0 binary compatibility",
|
||||
@ -816,7 +799,6 @@ DMenu MenuSubDistributions = {
|
||||
#if __FreeBSD__ > 3
|
||||
{ "compat3x", "FreeBSD 3.x binary compatibility",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT3X },
|
||||
#endif
|
||||
#endif
|
||||
{ "DES", "DES encryption code - NOT FOR EXPORT!",
|
||||
DESFlagCheck, distSetDES },
|
||||
@ -838,8 +820,6 @@ DMenu MenuSubDistributions = {
|
||||
srcFlagCheck, distSetSrc },
|
||||
{ "ports", "The FreeBSD Ports collection",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS },
|
||||
{ "local", "Local additions collection",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LOCAL},
|
||||
{ "XFree86", "The XFree86 3.3.4 distribution",
|
||||
x11FlagCheck, distSetXF86 },
|
||||
{ "All", "All sources, binaries and X Window System binaries",
|
||||
@ -954,10 +934,8 @@ DMenu MenuXF86SelectCore = {
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_HTML },
|
||||
{ "lib", "Data files needed at runtime",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LIB },
|
||||
#ifdef __i386__
|
||||
{ "lk98", "Server link kit for PC98 machines",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT98 },
|
||||
#endif
|
||||
{ "lkit", "Server link kit for all other machines",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT },
|
||||
{ "man", "Manual pages",
|
||||
@ -966,10 +944,8 @@ DMenu MenuXF86SelectCore = {
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PROG },
|
||||
{ "set", "XFree86 Setup Utility",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SET },
|
||||
#ifdef __i386__
|
||||
{ "9set", "XFree86 Setup Utility for PC98 machines",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_9SET },
|
||||
#endif
|
||||
{ "sources", "XFree86 3.3.4 standard sources",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SRC },
|
||||
{ "csources", "XFree86 3.3.4 contrib sources",
|
||||
@ -1050,13 +1026,8 @@ DMenu MenuXF86SelectServer = {
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3V },
|
||||
{ "W32", "8-bit ET4000/W32, /W32i and /W32p cards",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_W32 },
|
||||
#ifdef __i386__
|
||||
{ "PC98", "Select an X server for a NEC PC98 [Submenu]",
|
||||
NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server, '>', ' ', '>', 0 },
|
||||
#elif __alpha__
|
||||
{ "TGA", "TGA cards (alpha architecture only)",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_TGA },
|
||||
#endif
|
||||
{ "All", "Select all of the above",
|
||||
NULL, setX11Servers, NULL, NULL, ' ', ' ', ' ' },
|
||||
{ "Clear", "Reset all of the above",
|
||||
@ -1066,7 +1037,6 @@ DMenu MenuXF86SelectServer = {
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
#ifdef __i386__
|
||||
DMenu MenuXF86SelectPC98Server = {
|
||||
DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"PC98 X Server selection.",
|
||||
@ -1108,7 +1078,6 @@ Mono servers are particularly well-suited to most LCD displays).",
|
||||
checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
|
||||
{ NULL } }
|
||||
};
|
||||
#endif
|
||||
|
||||
DMenu MenuDiskDevices = {
|
||||
DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
|
||||
@ -1208,10 +1177,8 @@ DMenu MenuConfigure = {
|
||||
NULL, dmenuSystemCommand, NULL, "passwd root" },
|
||||
{ "L Label", "The disk Label editor",
|
||||
NULL, diskLabelEditor },
|
||||
#ifdef __i386__
|
||||
{ "F Fdisk", "The disk Slice (PC-style partition) Editor",
|
||||
NULL, diskPartitionEditor },
|
||||
#endif
|
||||
{ "1 User Management", "Add user and group information",
|
||||
NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
|
||||
{ "2 Console", "Customize system console behavior",
|
||||
@ -1383,6 +1350,12 @@ DMenu MenuNTP = {
|
||||
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=YES,ntpdate_flags=ncar.ucar.edu" },
|
||||
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=YES,ntpdate_flags=chantry.hawaii.net" },
|
||||
{ "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=YES,ntpdate_flags=shorty.chpc.utexas.edu" },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" Copyright (c) 1997
|
||||
.\" Jordan Hubbard <jkh@FreeBSD.org>. All rights reserved.
|
||||
.\" Jordan Hubbard <jkh@freebsd.org>. All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
@ -37,17 +37,11 @@
|
||||
.Op Ar ...
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
is a utility for installing and configuring
|
||||
.Fx
|
||||
systems.
|
||||
It is the first utility invoked by the
|
||||
.Fx
|
||||
installation boot
|
||||
is a utility for installing and configuring FreeBSD systems.
|
||||
It is the first utility invoked by the FreeBSD installation boot
|
||||
floppy and is also copied into
|
||||
.Pa /stand/sysinstall
|
||||
on newly installed
|
||||
.Fx
|
||||
systems for use in later configuring the system.
|
||||
on newly installed FreeBSD systems for use in later configuring the system.
|
||||
.Pp
|
||||
The
|
||||
.Nm
|
||||
@ -69,14 +63,10 @@ the ability to write MBRs and disk labels (through the services
|
||||
of the
|
||||
.Xr libdisk 3
|
||||
library) and install distributions or packages onto new and
|
||||
existing
|
||||
.Fx
|
||||
systems. It also contains some extra intelligence
|
||||
existing FreeBSD systems. It also contains some extra intelligence
|
||||
for running as a replacement for
|
||||
.Xr init 8
|
||||
when it's invoked by the
|
||||
.Fx
|
||||
installation boot procedure. It
|
||||
when it's invoked by the FreeBSD installation boot procedure. It
|
||||
assumes very little in the way of additional utility support and
|
||||
performs most file system operations by calling the relevant syscalls
|
||||
(such as
|
||||
@ -89,12 +79,11 @@ currently uses the
|
||||
library to do user interaction with simple ANSI line graphics, color
|
||||
support for which is enabled by either running on a syscons VTY or some
|
||||
other color-capable terminal emulator (newer versions of xterm will support
|
||||
color when using the
|
||||
.Dq xterm-color
|
||||
termcap entry).
|
||||
color when using the ``xterm-color'' termcap entry).
|
||||
.Pp
|
||||
This product is currently at the end of its life cycle and will
|
||||
eventually be replaced.
|
||||
utility.
|
||||
.Sh RUNNING SCRIPTS
|
||||
.Nm
|
||||
may be either driven interactively through its various internal menus
|
||||
@ -135,7 +124,7 @@ directive), upon reaching the end of the argument list or on error.
|
||||
For example:
|
||||
.nf
|
||||
|
||||
/stand/sysinstall _ftpPath=ftp://ziggy/pub/ mediaSetFTP configPackages
|
||||
/stand/sysinstall _ftpPath=ftp:/ziggy/pub/ mediaSetFTP configPackages
|
||||
|
||||
.fi
|
||||
Would initialize
|
||||
@ -189,11 +178,7 @@ loading any required 3rd-party routing daemons as necessary.
|
||||
.Bl -tag -width indent
|
||||
.It router
|
||||
can be set to the name of the desired routing daemon,
|
||||
e.g.
|
||||
.Dq routed
|
||||
or
|
||||
.Dq gated ,
|
||||
otherwise it is prompted for.
|
||||
e.g. ``routed'' or ``gated'', otherwise it is prompted for.
|
||||
.El
|
||||
.It configNFSServer
|
||||
Configure host as an NFS server.
|
||||
@ -241,27 +226,18 @@ change to geometry.
|
||||
.It partition
|
||||
Set to disk partitioning type or size, its value being
|
||||
.Ar free
|
||||
in order to use only remaining free space for
|
||||
.Fx ,
|
||||
in order to use only remaining free space for FreeBSD,
|
||||
.Ar all
|
||||
to use the entire disk for
|
||||
.Fx
|
||||
but maintain a proper partition
|
||||
to use the entire disk for FreeBSD but maintain a proper partition
|
||||
table,
|
||||
.Ar existing
|
||||
to use an existing
|
||||
.Fx
|
||||
partition (first found),
|
||||
to use an existing FreeBSD partition (first found),
|
||||
.Ar exclusive
|
||||
to use the disk in
|
||||
.Dq dangerously dedicated
|
||||
mode or, finally,
|
||||
to use the disk in ``dangerously dedicated'' mode or, finally,
|
||||
.Ar somenumber
|
||||
to allocate
|
||||
.Ar somenumber
|
||||
blocks of available free space to a new
|
||||
.Fx
|
||||
partition.
|
||||
blocks of available free space to a new FreeBSD partition.
|
||||
Default: Interactive mode.
|
||||
.It bootManager
|
||||
is set to one of
|
||||
@ -286,8 +262,7 @@ function) to be written out.
|
||||
\fBVariables:\fR None
|
||||
.It diskLabelEditor
|
||||
Invokes the disk label editor. This is a bit trickier from a script
|
||||
since you need to essentially label everything inside each
|
||||
.Fx
|
||||
since you need to essentially label everything inside each FreeBSD
|
||||
(type 0xA5) partition created by the
|
||||
.Ar diskPartitionEditor
|
||||
function, and that requires knowing a few rules about how things are
|
||||
@ -298,20 +273,15 @@ what the slice names will be, then and only then hardwiring them into
|
||||
the script.
|
||||
.Pp
|
||||
For example, let's say you have a SCSI disk on which you've created a new
|
||||
.Fx
|
||||
partition in slice 2 (your DOS partition residing in slice 1).
|
||||
FreeBSD partition in slice 2 (your DOS partition residing in slice 1).
|
||||
The slice name would be
|
||||
.Ar da0s2
|
||||
for the whole
|
||||
.Fx
|
||||
partition
|
||||
.Ar ( da0s1
|
||||
for the whole FreeBSD partition (
|
||||
.Ar da0s1
|
||||
being your DOS primary
|
||||
partition). Now let's further assume that you have 500MB in this
|
||||
partition and you want to sub-partition that space into root, swap,
|
||||
var and usr file systems for
|
||||
.Fx .
|
||||
Your invocation of the
|
||||
var and usr file systems for FreeBSD. Your invocation of the
|
||||
.Ar diskLabelEditor
|
||||
function might involve setting the following variables:
|
||||
.Bl -tag -width findx
|
||||
@ -366,12 +336,11 @@ Resets all selected distributions to the empty set (no distributions selected).
|
||||
.It distSetCustom
|
||||
Allows the selection of a custom distribution set (e.g. not just on of the
|
||||
existing "canned" sets) with no user interaction.
|
||||
|
||||
\fBVariables:\fR
|
||||
.Bl -tag -width indent
|
||||
.It dists
|
||||
List of distributions to load. Possible distribution values are:
|
||||
.Bl -tag -width indentxx
|
||||
.Bl -tag -width indent
|
||||
.It Li bin
|
||||
The base binary distribution.
|
||||
.It Li doc
|
||||
@ -391,31 +360,19 @@ GNU info files and other extra docs.
|
||||
.It Li des
|
||||
DES encryption binaries and libraries.
|
||||
.It Li compat1x
|
||||
Compatibility with
|
||||
.It Li 1.x
|
||||
Compatibility with FreeBSD 1.x
|
||||
.It Li compat20
|
||||
Compatibility with
|
||||
.Fx 2.0
|
||||
Compatibility with FreeBSD 2.0
|
||||
.It Li compat21
|
||||
Compatibility with
|
||||
.Fx 2.1
|
||||
.It Li compat22
|
||||
.Fx 2.2
|
||||
and
|
||||
.Fx 3.0
|
||||
a.out binary compatibility
|
||||
.It Li compat3x
|
||||
Compatibility with
|
||||
.It Li 3.x
|
||||
(available for
|
||||
.Fx 4.0
|
||||
systems only)
|
||||
Compatibility with FreeBSD 2.1
|
||||
.It Li ports
|
||||
The ports collection.
|
||||
.It Li krb
|
||||
Kerberos binaries.
|
||||
.It Li ssecure
|
||||
/usr/src/secure
|
||||
.It Li sebones
|
||||
/usr/src/eBones
|
||||
.It Li sbase
|
||||
/usr/src/[top level files]
|
||||
.It Li scontrib
|
||||
@ -524,8 +481,6 @@ XFree86 3.3.4 SVGA server.
|
||||
XFree86 3.3.4 VGA16 server.
|
||||
.It Li XW32
|
||||
XFree86 3.3.4 ET4000/W32, /W32i and /W32p server.
|
||||
.It Li XTGA
|
||||
Server for TGA cards (alpha architecture only).
|
||||
.It Li Xnest
|
||||
XFree86 3.3.4 nested X server.
|
||||
.It Li Xvfb
|
||||
@ -607,7 +562,6 @@ variable). Defaults to lynx.
|
||||
Commit any and all pending changes to disk. This function
|
||||
is essentially shorthand for a number of more granular "commit"
|
||||
functions.
|
||||
.Pp
|
||||
\fBVariables:\fR None
|
||||
.It installExpress
|
||||
Start an "express" installation, asking few questions of
|
||||
@ -657,9 +611,7 @@ configuration file from another.
|
||||
The fully pathname of the file to load.
|
||||
.El
|
||||
.It mediaSetCDROM
|
||||
Select a
|
||||
.Fx
|
||||
CDROM as the installation media.
|
||||
Select a FreeBSD CDROM as the installation media.
|
||||
.Pp
|
||||
\fBVariables:\fR None
|
||||
.It mediaSetFloppy
|
||||
@ -687,8 +639,8 @@ The domain name of the host being installed (optional).
|
||||
.It defaultrouter
|
||||
The default router for this host (non-optional).
|
||||
.It netDev
|
||||
Which host interface to use
|
||||
.Ar ( ed0
|
||||
Which host interface to use (
|
||||
.Ar ed0
|
||||
or
|
||||
.Ar ep0 ,
|
||||
for example. Non-optional).
|
||||
@ -700,10 +652,9 @@ The IP address for the selected host interface (non-optional).
|
||||
.It netmask
|
||||
The netmask for the selected host interface (non-optional).
|
||||
.It _ftpPath
|
||||
The fully qualified URL of the FTP site containing the
|
||||
.Fx
|
||||
The fully qualified URL of the FTP site containing the FreeBSD
|
||||
distribution you're interested in, e.g.
|
||||
.Ar ftp://ftp.FreeBSD.org/pub/FreeBSD/ .
|
||||
.Ar ftp://ftp.freebsd.org/pub/FreeBSD/ .
|
||||
.El
|
||||
.It mediaSetFTPActive
|
||||
Alias for
|
||||
@ -726,9 +677,7 @@ the installation media.
|
||||
\fBVariables:\fR
|
||||
.Bl -tag -width indent
|
||||
.It ufs
|
||||
full /path to directory containing the
|
||||
.Fx
|
||||
distribution you're
|
||||
full /path to directory containing the FreeBSD distribution you're
|
||||
interested in.
|
||||
.El
|
||||
.It mediaSetNFS
|
||||
@ -742,8 +691,8 @@ The domain name of the host being installed (optional).
|
||||
.It defaultrouter
|
||||
The default router for this host (non-optional).
|
||||
.It netDev
|
||||
Which host interface to use
|
||||
.Ar ( ed0
|
||||
Which host interface to use (
|
||||
.Ar ed0
|
||||
or
|
||||
.Ar ep0 ,
|
||||
for example. Non-optional).
|
||||
@ -756,9 +705,7 @@ The IP address for the selected host interface (non-optional).
|
||||
The netmask for the selected host interface (non-optional).
|
||||
.It nfs
|
||||
full hostname:/path specification for directory containing
|
||||
the
|
||||
.Fx
|
||||
distribution you're interested in.
|
||||
the FreeBSD distribution you're interested in.
|
||||
.El
|
||||
.It mediaSetFTPUserPass
|
||||
.Pp
|
||||
|
@ -160,7 +160,6 @@
|
||||
#define VAR_SLOW_ETHER "slowEthernetCard"
|
||||
#define VAR_SWAP_SIZE "swapSize"
|
||||
#define VAR_TAPE_BLOCKSIZE "tapeBlocksize"
|
||||
#define VAR_TRY_DHCP "tryDHCP"
|
||||
#define VAR_UFS_PATH "ufs"
|
||||
#define VAR_USR_SIZE "usrSize"
|
||||
#define VAR_VAR_SIZE "varSize"
|
||||
@ -319,7 +318,6 @@ typedef int (*commandFunc)(char *key, void *data);
|
||||
|
||||
/* This is the structure that Network devices carry around in their private, erm, structures */
|
||||
typedef struct _devPriv {
|
||||
int use_dhcp;
|
||||
char ipaddr[IPADDR_FIELD_LEN];
|
||||
char netmask[IPADDR_FIELD_LEN];
|
||||
char extras[EXTRAS_FIELD_LEN];
|
||||
@ -453,10 +451,6 @@ extern Boolean dummyInit(Device *dev);
|
||||
extern FILE *dummyGet(Device *dev, char *dist, Boolean probe);
|
||||
extern void dummyShutdown(Device *dev);
|
||||
|
||||
/* dhcp.c */
|
||||
extern int dhcpParseLeases(char *file, char *hostname, char *domain, char *nameserver,
|
||||
char *ipaddr, char *gateway, char *netmask);
|
||||
|
||||
/* disks.c */
|
||||
extern int diskPartitionEditor(dialogMenuItem *self);
|
||||
extern int diskPartitionWrite(dialogMenuItem *self);
|
||||
|
@ -71,9 +71,7 @@ expand(char *fname)
|
||||
void
|
||||
systemInitialize(int argc, char **argv)
|
||||
{
|
||||
#ifdef __alpha__
|
||||
int i;
|
||||
#endif
|
||||
|
||||
signal(SIGINT, SIG_IGN);
|
||||
globalsInit();
|
||||
@ -111,15 +109,11 @@ systemInitialize(int argc, char **argv)
|
||||
close(1); dup(0);
|
||||
close(2); dup(0);
|
||||
printf("%s running as init on %s\n", argv[0], OnVTY ? "vty0" : "serial console");
|
||||
ioctl(0, TIOCSCTTY, (char *)NULL);
|
||||
i = ioctl(0, TIOCSCTTY, (char *)NULL);
|
||||
setlogin("root");
|
||||
setenv("PATH", "/stand:/bin:/sbin:/usr/sbin:/usr/bin:/mnt/bin:/mnt/sbin:/mnt/usr/sbin:/mnt/usr/bin:/usr/X11R6/bin", 1);
|
||||
setbuf(stdin, 0);
|
||||
setbuf(stderr, 0);
|
||||
#ifdef __alpha__
|
||||
i = 0;
|
||||
sysctlbyname("machdep.unaligned_print", NULL, 0, &i, sizeof(i));
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
char hname[256];
|
||||
@ -353,7 +347,7 @@ systemCreateHoloshell(void)
|
||||
if (kill(ehs_pid, 0) == 0) {
|
||||
|
||||
if (msgYesNo("There seems to be an emergency holographic shell\n"
|
||||
"already running on VTY 4.\n\n"
|
||||
"already running on VTY 4.\n"
|
||||
"Kill it and start a new one?"))
|
||||
return;
|
||||
|
||||
|
@ -58,8 +58,7 @@ make_variable(char *var, char *value, int dirty)
|
||||
setenv(var, value, 1);
|
||||
free(vp->value);
|
||||
vp->value = strdup(value);
|
||||
if (dirty != -1)
|
||||
vp->dirty = dirty;
|
||||
vp->dirty = dirty;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -69,8 +68,6 @@ make_variable(char *var, char *value, int dirty)
|
||||
vp = (Variable *)safe_malloc(sizeof(Variable));
|
||||
vp->name = strdup(var);
|
||||
vp->value = strdup(value);
|
||||
if (dirty == -1)
|
||||
dirty = 0;
|
||||
vp->dirty = dirty;
|
||||
vp->next = VarHead;
|
||||
VarHead = vp;
|
||||
|
@ -9,7 +9,7 @@ CLEANFILES+= keymap.tmp keymap.h pccard_conf.h
|
||||
|
||||
.PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum
|
||||
|
||||
SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c kget.c \
|
||||
SRCS= anonFTP.c cdrom.c command.c config.c devices.c kget.c \
|
||||
disks.c dispatch.c dist.c dmenu.c doc.c dos.c floppy.c \
|
||||
ftp.c globals.c index.c install.c installUpgrade.c keymap.c \
|
||||
label.c lndir.c main.c makedevs.c media.c menus.c misc.c mouse.c \
|
||||
@ -19,6 +19,7 @@ SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c kget.c \
|
||||
|
||||
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR}
|
||||
CFLAGS+= -I${.CURDIR}/../../sys
|
||||
CFLAGS+= -DUC_PRIVATE -DKERN_NO_SYMBOLS
|
||||
|
||||
PCCARD?= NO
|
||||
|
||||
|
@ -453,7 +453,7 @@ configLinux(dialogMenuItem *self)
|
||||
{
|
||||
variable_set2(VAR_LINUX_ENABLE, "YES", 1);
|
||||
msgNotify("Installing Linux compatibility library...");
|
||||
return package_add("linux_base");
|
||||
return package_add("linux_lib");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -99,16 +99,15 @@ static struct _devname {
|
||||
{ DEVICE_TYPE_NETWORK, "ix", "Intel Etherexpress ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "le", "DEC EtherWorks 2 or 3 ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet (Isolan/Novell NE2100/NE32-VL) ethernet" },
|
||||
{ DEVICE_TYPE_NETWORK, "mx", "Macronix 98713/98715/98725 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "pn", "Lite-On 82168/82169 PNIC PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "sf", "Adaptec AIC-6915 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ste", "Sundance ST201 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "sk", "SysKonnect PCI gigabit ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "mx", "Macronix 98713/98715/98725 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "pn", "Lite-On 82168/82169 PNIC PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "sf", "Adaptec AIC-6915 PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "sk", "SysKonnect PCI gigabit ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "tx", "SMC 9432TX ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ti", "Alteon Networks PCI gigabit ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ti", "Alteon Networks PCI gigabit ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "tl", "Texas Instruments ThunderLAN PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "vr", "VIA VT3043/VT86C100A Rhine PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "vr", "VIA VT3043/VT86C100A Rhine PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "vx", "3COM 3c590 / 3c595 ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "wb", "Winbond W89C840F PCI ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "xl", "3COM 3c90x / 3c90xB PCI ethernet card" },
|
||||
|
@ -455,16 +455,20 @@ diskPartition(Device *dev)
|
||||
* disk (i.e., the disklabel starts at sector 0), even in cases where the user has requested
|
||||
* booteasy or a "standard" MBR -- both would be fatal in this case.
|
||||
*/
|
||||
#if 0
|
||||
if ((d->chunks->part->flags & CHUNK_FORCE_ALL) != CHUNK_FORCE_ALL
|
||||
&& (mbrContents = getBootMgr(d->name)) != NULL)
|
||||
Set_Boot_Mgr(d, mbrContents);
|
||||
#else
|
||||
/*
|
||||
* Don't offer to update the MBR on this disk if the first "real" chunk looks like
|
||||
* a FreeBSD "all disk" partition, or the disk is entirely FreeBSD.
|
||||
*/
|
||||
if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1)))
|
||||
mbrContents = getBootMgr(d->name);
|
||||
else
|
||||
mbrContents = NULL;
|
||||
Set_Boot_Mgr(d, mbrContents);
|
||||
|
||||
if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1)) &&
|
||||
(mbrContents = getBootMgr(d->name)) != NULL)
|
||||
Set_Boot_Mgr(d, mbrContents);
|
||||
#endif
|
||||
|
||||
if (DITEM_STATUS(diskPartitionWrite(NULL)) != DITEM_SUCCESS)
|
||||
msgConfirm("Disk partition write returned an error status!");
|
||||
else
|
||||
|
@ -73,7 +73,6 @@ static Distribution DistTable[] = {
|
||||
{ "info", "/", &Dists, DIST_INFO, NULL },
|
||||
{ "src", "/", &Dists, DIST_SRC, SrcDistTable },
|
||||
{ "des", "/", &Dists, DIST_DES, DESDistTable },
|
||||
#ifdef __i386__
|
||||
{ "compat1x", "/", &Dists, DIST_COMPAT1X, NULL },
|
||||
{ "compat20", "/", &Dists, DIST_COMPAT20, NULL },
|
||||
{ "compat21", "/", &Dists, DIST_COMPAT21, NULL },
|
||||
@ -81,9 +80,7 @@ static Distribution DistTable[] = {
|
||||
#if __FreeBSD__ > 3
|
||||
{ "compat3x", "/", &Dists, DIST_COMPAT3X, NULL },
|
||||
#endif
|
||||
#endif
|
||||
{ "ports", "/usr", &Dists, DIST_PORTS, NULL },
|
||||
{ "local", "/", &Dists, DIST_LOCAL, NULL },
|
||||
{ "XF86334", "/usr", &Dists, DIST_XF86, XF86DistTable },
|
||||
{ NULL },
|
||||
};
|
||||
@ -141,7 +138,6 @@ static Distribution XF86DistTable[] = {
|
||||
|
||||
/* The XFree86 server distribution */
|
||||
static Distribution XF86ServerDistTable[] = {
|
||||
#ifdef __i386__
|
||||
{ "PC98-Servers/X9480", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9480, NULL },
|
||||
{ "PC98-Servers/X9EGC", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9EGC, NULL },
|
||||
{ "PC98-Servers/X9GA9", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9GA9, NULL },
|
||||
@ -156,7 +152,6 @@ static Distribution XF86ServerDistTable[] = {
|
||||
{ "PC98-Servers/X9WEP", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9WEP, NULL },
|
||||
{ "PC98-Servers/X9WS", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9WS, NULL },
|
||||
{ "PC98-Servers/X9WSN", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9WSN, NULL },
|
||||
#endif
|
||||
{ "Servers/X3DL", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_3DL, NULL },
|
||||
{ "Servers/X8514", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_8514, NULL },
|
||||
{ "Servers/XAGX", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_AGX, NULL },
|
||||
@ -171,9 +166,6 @@ static Distribution XF86ServerDistTable[] = {
|
||||
{ "Servers/XSVGA", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_SVGA, NULL },
|
||||
{ "Servers/XVG16", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_VGA16, NULL },
|
||||
{ "Servers/XW32", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_W32, NULL },
|
||||
#ifdef __alpha__
|
||||
{ "Servers/XTGA", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_TGA, NULL },
|
||||
#endif
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
@ -208,12 +200,8 @@ distVerifyFlags(void)
|
||||
XF86Dists |= DIST_XF86_SERVER;
|
||||
if (XF86FontDists)
|
||||
XF86Dists |= DIST_XF86_FONTS;
|
||||
if (XF86Dists || XF86ServerDists || XF86FontDists) {
|
||||
if (XF86Dists || XF86ServerDists || XF86FontDists)
|
||||
Dists |= DIST_XF86;
|
||||
#ifdef __i386__
|
||||
Dists |= DIST_COMPAT22; /* For certain old X applications */
|
||||
#endif
|
||||
}
|
||||
if (isDebug())
|
||||
msgDebug("Dist Masks: Dists: %0x, DES: %0x, Srcs: %0x\nXServer: %0x, XFonts: %0x, XDists: %0x\n",
|
||||
Dists, DESDists, SrcDists, XF86ServerDists, XF86FontDists, XF86Dists);
|
||||
|
@ -12,19 +12,16 @@
|
||||
#define DIST_SRC 0x00020
|
||||
#define DIST_DOC 0x00040
|
||||
#define DIST_INFO 0x00080
|
||||
#ifdef __i386__ /* only applicable on x86 */
|
||||
#define DIST_COMPAT1X 0x00100
|
||||
#define DIST_COMPAT20 0x00200
|
||||
#define DIST_COMPAT21 0x00400
|
||||
#define DIST_COMPAT22 0x00800
|
||||
#define DIST_COMPAT3X 0x01000
|
||||
#endif
|
||||
#define DIST_XF86 0x02000
|
||||
#define DIST_DES 0x04000
|
||||
#define DIST_CATPAGES 0x08000
|
||||
#define DIST_PORTS 0x10000
|
||||
#define DIST_LOCAL 0x20000
|
||||
#define DIST_ALL 0x3FFFF
|
||||
#define DIST_ALL 0x1FFFF
|
||||
|
||||
/* Canned distribution sets */
|
||||
#define _DIST_DEVELOPER \
|
||||
@ -76,7 +73,6 @@
|
||||
#define DIST_XF86_CSRC 0x2000
|
||||
#define DIST_XF86_MISC_ALL 0x3FFF
|
||||
#define DIST_XF86_SERVER 0x8000
|
||||
#ifdef __i386__
|
||||
#define DIST_XF86_SERVER_9MGA 0x0000001
|
||||
#define DIST_XF86_SERVER_9480 0x0000002
|
||||
#define DIST_XF86_SERVER_9EGC 0x0000004
|
||||
@ -91,9 +87,6 @@
|
||||
#define DIST_XF86_SERVER_9WEP 0x0000800
|
||||
#define DIST_XF86_SERVER_9WS 0x0001000
|
||||
#define DIST_XF86_SERVER_9WSN 0x0002000
|
||||
#elif __alpha__
|
||||
#define DIST_XF86_SERVER_TGA 0x0000001
|
||||
#endif
|
||||
#define DIST_XF86_SERVER_8514 0x0004000
|
||||
#define DIST_XF86_SERVER_AGX 0x0008000
|
||||
#define DIST_XF86_SERVER_I128 0x0010000
|
||||
|
@ -102,9 +102,7 @@ static char *descrs[] = {
|
||||
"german", "Ported software for Germanic countries.",
|
||||
"graphics", "Graphics libraries and utilities.",
|
||||
"gnome", "Components of the Gnome Desktop environment.",
|
||||
"irc", "Internet Relay Chat utilities.",
|
||||
"japanese", "Ported software for the Japanese market.",
|
||||
"java", "Java language support.",
|
||||
"kde", "Software for the K Desktop Environment.",
|
||||
"korean", "Ported software for the Korean market.",
|
||||
"lang", "Computer languages.",
|
||||
@ -148,7 +146,6 @@ static char *descrs[] = {
|
||||
"x11-clocks", "X Window System based clocks.",
|
||||
"x11-fm", "X Window System based file managers.",
|
||||
"x11-fonts", "X Window System fonts and font utilities.",
|
||||
"x11-servers", "X Window System servers.",
|
||||
"x11-toolkits", "X Window System based development toolkits.",
|
||||
"x11-wm", "X Window System window managers.",
|
||||
NULL, NULL,
|
||||
@ -420,6 +417,7 @@ index_search(PkgNodePtr top, char *str, PkgNodePtr *tp)
|
||||
*tp = top;
|
||||
return p;
|
||||
}
|
||||
|
||||
}
|
||||
else if (p->kids) {
|
||||
/* The usual recursion-out-of-laziness ploy */
|
||||
|
@ -533,7 +533,7 @@ installNovice(dialogMenuItem *self)
|
||||
dialog_clear_norefresh();
|
||||
tmp = tcpDeviceSelect();
|
||||
dialog_clear_norefresh();
|
||||
if (tmp && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (tmp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (!tmp->init(tmp))
|
||||
msgConfirm("Initialization of %s device failed.", tmp->name);
|
||||
}
|
||||
@ -754,8 +754,6 @@ installFixupBin(dialogMenuItem *self)
|
||||
if ((fp = fopen("/boot/loader.conf", "a")) != NULL) {
|
||||
fprintf(fp, "# -- sysinstall generated deltas -- #\n");
|
||||
fprintf(fp, "userconfig_script_load=\"YES\"\n");
|
||||
if (!OnVTY)
|
||||
fprintf(fp, "console=\"serial\"\n");
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
@ -1033,7 +1031,6 @@ installVarDefaults(dialogMenuItem *self)
|
||||
variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE, 0);
|
||||
variable_set2(VAR_INSTALL_ROOT, "/", 0);
|
||||
variable_set2(VAR_INSTALL_CFG, "install.cfg", 0);
|
||||
variable_set2(VAR_TRY_DHCP, "NO", 0); /* For now */
|
||||
cp = getenv("EDITOR");
|
||||
if (!cp)
|
||||
cp = "/usr/bin/ee";
|
||||
@ -1042,14 +1039,13 @@ installVarDefaults(dialogMenuItem *self)
|
||||
variable_set2(VAR_BROWSER_PACKAGE, "lynx", 0);
|
||||
variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx", 0);
|
||||
variable_set2(VAR_FTP_STATE, "passive", 0);
|
||||
variable_set2(VAR_NFS_SECURE, "NO", -1);
|
||||
variable_set2(VAR_NFS_SECURE, "YES", 0);
|
||||
variable_set2(VAR_PKG_TMPDIR, "/usr/tmp", 0);
|
||||
variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT), 0);
|
||||
if (getpid() != 1)
|
||||
variable_set2(SYSTEM_STATE, "update", 0);
|
||||
else
|
||||
variable_set2(SYSTEM_STATE, "init", 0);
|
||||
variable_set2(VAR_NEWFS_ARGS, "-b 8192 -f 1024", 0);
|
||||
return DITEM_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -26,15 +26,6 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifdef __alpha__
|
||||
int
|
||||
kget(char *out)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include "sysinstall.h"
|
||||
#include <sys/sysctl.h>
|
||||
#include <i386/isa/isa_device.h>
|
||||
@ -175,5 +166,3 @@ kget(char *out)
|
||||
fclose(fout);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* !alpha */
|
||||
|
@ -409,8 +409,7 @@ mediaSetFTP(dialogMenuItem *self)
|
||||
return DITEM_FAILURE | what;
|
||||
}
|
||||
}
|
||||
if (isDebug())
|
||||
msgDebug("Found DNS entry for %s successfully..\n", hostname);
|
||||
msgDebug("Found DNS entry for %s successfully..\n", hostname);
|
||||
}
|
||||
variable_set2(VAR_FTP_HOST, hostname, 0);
|
||||
variable_set2(VAR_FTP_DIR, dir ? dir : "/", 0);
|
||||
@ -511,10 +510,8 @@ mediaSetNFS(dialogMenuItem *self)
|
||||
variable_unset(VAR_NFS_PATH);
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
else {
|
||||
if (isDebug())
|
||||
msgDebug("Found DNS entry for %s successfully..", hostname);
|
||||
}
|
||||
else
|
||||
msgDebug("Found DNS entry for %s successfully..", hostname);
|
||||
}
|
||||
variable_set2(VAR_NFS_HOST, hostname, 0);
|
||||
nfsDevice.type = DEVICE_TYPE_NFS;
|
||||
|
@ -254,9 +254,7 @@ DMenu MenuIndex = {
|
||||
{ "Doc, HTML", "The HTML documentation menu.", NULL, docBrowser },
|
||||
{ "Dump Vars", "(debugging) dump out internal variables.", NULL, dump_variables },
|
||||
{ "Emergency shell", "Start an Emergency Holographic shell.", NULL, installFixitHoloShell },
|
||||
#ifdef __i386__
|
||||
{ "Fdisk", "The disk Partition Editor", NULL, diskPartitionEditor },
|
||||
#endif
|
||||
{ "Fixit", "Repair mode with CDROM or fixit floppy.", NULL, dmenuSubmenu, NULL, &MenuFixit },
|
||||
{ "FTP sites", "The FTP mirror site listing.", NULL, dmenuSubmenu, NULL, &MenuMediaFTP },
|
||||
{ "Gateway", "Set flag to route packets between interfaces.", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" },
|
||||
@ -297,9 +295,7 @@ DMenu MenuIndex = {
|
||||
{ "User Management", "Add user and group information.", NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
|
||||
{ "XFree86, Fonts", "XFree86 Font selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
|
||||
{ "XFree86, Server", "XFree86 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer },
|
||||
#ifdef __i386__
|
||||
{ "XFree86, PC98 Server", "XFree86 PC98 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server },
|
||||
#endif
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -432,10 +428,6 @@ DMenu MenuMouse = {
|
||||
DMenu MenuXF86Config = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Please select the XFree86 configuration tool you want to use.",
|
||||
#ifdef __alpha__
|
||||
"Due to problems with the VGA16 server right now, only the\n"
|
||||
"text-mode configuration tool (xf86config) is currently supported.",
|
||||
#else
|
||||
"The first tool, XF86Setup, is fully graphical and requires the\n"
|
||||
"VGA16 server in order to work (should have been selected by\n"
|
||||
"default, but if you de-selected it then you won't be able to\n"
|
||||
@ -443,20 +435,14 @@ DMenu MenuXF86Config = {
|
||||
"a more simplistic shell-script based tool and less friendly to\n"
|
||||
"new users, but it may work in situations where the fancier one\n"
|
||||
"does not.",
|
||||
#endif
|
||||
NULL,
|
||||
NULL,
|
||||
#ifdef __alpha__
|
||||
{ { "xf86config", "Shell-script based XFree86 configuration tool.",
|
||||
NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" },
|
||||
#else
|
||||
{ { "XF86Setup", "Fully graphical XFree86 configuration tool.",
|
||||
NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF86Setup" },
|
||||
{ "xf86config", "Shell-script based XFree86 configuration tool.",
|
||||
NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" },
|
||||
{ "XF98Setup", "Fully graphical XFree86 configuration tool (PC98).",
|
||||
NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF98Setup" },
|
||||
#endif
|
||||
{ "XDesktop", "X already set up, just do desktop configuration.",
|
||||
NULL, dmenuSubmenu, NULL, &MenuXDesktops },
|
||||
{ NULL } },
|
||||
@ -650,8 +636,6 @@ DMenu MenuMediaFTP = {
|
||||
VAR_FTP_PATH _AP("=ftp://ftp3.ru.freebsd.org") },
|
||||
{ "Russia #4", "ftp4.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
|
||||
VAR_FTP_PATH _AP("=ftp://ftp4.ru.freebsd.org") },
|
||||
{ "Slovak Republic", "ftp.sk.freebsd.org", NULL, dmenuSetVariable, NULL,
|
||||
VAR_FTP_PATH _AP("=ftp://ftp.sk.freebsd.org") },
|
||||
{ "South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL,
|
||||
VAR_FTP_PATH _AP("=ftp://ftp.za.freebsd.org") },
|
||||
{ "South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL,
|
||||
@ -804,7 +788,6 @@ DMenu MenuSubDistributions = {
|
||||
NULL,
|
||||
{ { "bin", "Binary base distribution (required)",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BIN },
|
||||
#ifdef __i386__
|
||||
{ "compat1x", "FreeBSD 1.x binary compatibility",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT1X },
|
||||
{ "compat20", "FreeBSD 2.0 binary compatibility",
|
||||
@ -816,7 +799,6 @@ DMenu MenuSubDistributions = {
|
||||
#if __FreeBSD__ > 3
|
||||
{ "compat3x", "FreeBSD 3.x binary compatibility",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT3X },
|
||||
#endif
|
||||
#endif
|
||||
{ "DES", "DES encryption code - NOT FOR EXPORT!",
|
||||
DESFlagCheck, distSetDES },
|
||||
@ -838,8 +820,6 @@ DMenu MenuSubDistributions = {
|
||||
srcFlagCheck, distSetSrc },
|
||||
{ "ports", "The FreeBSD Ports collection",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS },
|
||||
{ "local", "Local additions collection",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LOCAL},
|
||||
{ "XFree86", "The XFree86 3.3.4 distribution",
|
||||
x11FlagCheck, distSetXF86 },
|
||||
{ "All", "All sources, binaries and X Window System binaries",
|
||||
@ -954,10 +934,8 @@ DMenu MenuXF86SelectCore = {
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_HTML },
|
||||
{ "lib", "Data files needed at runtime",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LIB },
|
||||
#ifdef __i386__
|
||||
{ "lk98", "Server link kit for PC98 machines",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT98 },
|
||||
#endif
|
||||
{ "lkit", "Server link kit for all other machines",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT },
|
||||
{ "man", "Manual pages",
|
||||
@ -966,10 +944,8 @@ DMenu MenuXF86SelectCore = {
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PROG },
|
||||
{ "set", "XFree86 Setup Utility",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SET },
|
||||
#ifdef __i386__
|
||||
{ "9set", "XFree86 Setup Utility for PC98 machines",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_9SET },
|
||||
#endif
|
||||
{ "sources", "XFree86 3.3.4 standard sources",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SRC },
|
||||
{ "csources", "XFree86 3.3.4 contrib sources",
|
||||
@ -1050,13 +1026,8 @@ DMenu MenuXF86SelectServer = {
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3V },
|
||||
{ "W32", "8-bit ET4000/W32, /W32i and /W32p cards",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_W32 },
|
||||
#ifdef __i386__
|
||||
{ "PC98", "Select an X server for a NEC PC98 [Submenu]",
|
||||
NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server, '>', ' ', '>', 0 },
|
||||
#elif __alpha__
|
||||
{ "TGA", "TGA cards (alpha architecture only)",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_TGA },
|
||||
#endif
|
||||
{ "All", "Select all of the above",
|
||||
NULL, setX11Servers, NULL, NULL, ' ', ' ', ' ' },
|
||||
{ "Clear", "Reset all of the above",
|
||||
@ -1066,7 +1037,6 @@ DMenu MenuXF86SelectServer = {
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
#ifdef __i386__
|
||||
DMenu MenuXF86SelectPC98Server = {
|
||||
DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"PC98 X Server selection.",
|
||||
@ -1108,7 +1078,6 @@ Mono servers are particularly well-suited to most LCD displays).",
|
||||
checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
|
||||
{ NULL } }
|
||||
};
|
||||
#endif
|
||||
|
||||
DMenu MenuDiskDevices = {
|
||||
DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
|
||||
@ -1208,10 +1177,8 @@ DMenu MenuConfigure = {
|
||||
NULL, dmenuSystemCommand, NULL, "passwd root" },
|
||||
{ "L Label", "The disk Label editor",
|
||||
NULL, diskLabelEditor },
|
||||
#ifdef __i386__
|
||||
{ "F Fdisk", "The disk Slice (PC-style partition) Editor",
|
||||
NULL, diskPartitionEditor },
|
||||
#endif
|
||||
{ "1 User Management", "Add user and group information",
|
||||
NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
|
||||
{ "2 Console", "Customize system console behavior",
|
||||
@ -1383,6 +1350,12 @@ DMenu MenuNTP = {
|
||||
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=YES,ntpdate_flags=ncar.ucar.edu" },
|
||||
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=YES,ntpdate_flags=chantry.hawaii.net" },
|
||||
{ "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
|
||||
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||
"ntpdate_enable=YES,ntpdate_flags=shorty.chpc.utexas.edu" },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
|
@ -123,8 +123,6 @@ mediaInitNetwork(Device *dev)
|
||||
"in the Networking configuration menu before proceeding.", dev->name);
|
||||
return FALSE;
|
||||
}
|
||||
else if (!strcmp(cp, "DHCP"))
|
||||
goto bail;
|
||||
msgNotify("ifconfig %s %s", dev->name, cp);
|
||||
i = vsystem("ifconfig %s %s", dev->name, cp);
|
||||
if (i) {
|
||||
@ -142,7 +140,6 @@ mediaInitNetwork(Device *dev)
|
||||
msgNotify("Adding default route to %s.", rp);
|
||||
vsystem("route -n add default %s", rp);
|
||||
}
|
||||
bail:
|
||||
if (isDebug())
|
||||
msgDebug("Network initialized successfully.\n");
|
||||
networkInitialized = TRUE;
|
||||
@ -330,9 +327,9 @@ startPPP(Device *devp)
|
||||
dialog_clear_norefresh();
|
||||
msgConfirm("NOTICE: The PPP command is now started on VTY2 (type ALT-F3 to\n"
|
||||
"interact with it, ALT-F1 to switch back here). If you are using\n"
|
||||
"a PAP or CHAP login simply enter \"dial\", otherwise you'll need\n"
|
||||
"to use the \"term\" command which starts a terminal emulator\n"
|
||||
"which you can use to talk to your modem and dial the service\n"
|
||||
"a PAP or CHAP login simply enter \"dial\" otherwise you'll need\n"
|
||||
"need to use is the \"term\" command which starts a terminal\n"
|
||||
"emulator you can use to talk to your modem and dial the service\n"
|
||||
"provider. Once you're connected, come back to this screen and\n"
|
||||
"press return.\n\n"
|
||||
"DO NOT PRESS [ENTER] HERE UNTIL THE CONNECTION IS FULLY\n"
|
||||
|
@ -114,8 +114,6 @@ static Option Options[] = {
|
||||
OPT_IS_VAR, NULL, VAR_NO_WARN, varCheck },
|
||||
{ "Yes to All", "Assume \"Yes\" answers to all non-critical dialogs",
|
||||
OPT_IS_VAR, NULL, VAR_NO_CONFIRM, varCheck },
|
||||
{ "DHCP", "Attempt automatic DHCP configuration of interfaces",
|
||||
OPT_IS_VAR, NULL, VAR_TRY_DHCP, varCheck },
|
||||
{ "FTP username", "Username and password to use instead of anonymous",
|
||||
OPT_IS_FUNC, mediaSetFTPUserPass, VAR_FTP_USER, varCheck },
|
||||
{ "Editor", "Which text editor to use during installation",
|
||||
@ -192,17 +190,13 @@ fire(Option opt)
|
||||
}
|
||||
else if (opt.type == OPT_IS_VAR) {
|
||||
if (opt.data) {
|
||||
(void)variable_get_value(opt.aux, opt.data, -1);
|
||||
(void)variable_get_value(opt.aux, opt.data, 1);
|
||||
status = 1;
|
||||
}
|
||||
else if (variable_get(opt.aux)) {
|
||||
if (!variable_cmp(opt.aux, "YES"))
|
||||
variable_set2(opt.aux, "NO", -1);
|
||||
else
|
||||
variable_set2(opt.aux, "YES", -1);
|
||||
}
|
||||
else if (variable_get(opt.aux))
|
||||
variable_unset(opt.aux);
|
||||
else
|
||||
variable_set2(opt.aux, "YES", 0);
|
||||
variable_set2(opt.aux, "YES", 1);
|
||||
}
|
||||
if (opt.check)
|
||||
opt.check(opt);
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
static Boolean sigpipe_caught;
|
||||
static Boolean sigpipe_caught = FALSE;
|
||||
|
||||
static void
|
||||
catch_pipe(int sig)
|
||||
@ -60,14 +60,9 @@ package_add(char *name)
|
||||
|
||||
if (!mediaVerify())
|
||||
return DITEM_FAILURE;
|
||||
|
||||
if (!mediaDevice->init(mediaDevice))
|
||||
return DITEM_FAILURE;
|
||||
|
||||
i = index_initialize("packages/INDEX");
|
||||
if (DITEM_STATUS(i) != DITEM_SUCCESS)
|
||||
return i;
|
||||
|
||||
tmp3 = strpbrk(name, "-") ? NULL : &tmp2;
|
||||
tmp = index_search(&Top, name, tmp3);
|
||||
if (tmp)
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" Copyright (c) 1997
|
||||
.\" Jordan Hubbard <jkh@FreeBSD.org>. All rights reserved.
|
||||
.\" Jordan Hubbard <jkh@freebsd.org>. All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
@ -37,17 +37,11 @@
|
||||
.Op Ar ...
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
is a utility for installing and configuring
|
||||
.Fx
|
||||
systems.
|
||||
It is the first utility invoked by the
|
||||
.Fx
|
||||
installation boot
|
||||
is a utility for installing and configuring FreeBSD systems.
|
||||
It is the first utility invoked by the FreeBSD installation boot
|
||||
floppy and is also copied into
|
||||
.Pa /stand/sysinstall
|
||||
on newly installed
|
||||
.Fx
|
||||
systems for use in later configuring the system.
|
||||
on newly installed FreeBSD systems for use in later configuring the system.
|
||||
.Pp
|
||||
The
|
||||
.Nm
|
||||
@ -69,14 +63,10 @@ the ability to write MBRs and disk labels (through the services
|
||||
of the
|
||||
.Xr libdisk 3
|
||||
library) and install distributions or packages onto new and
|
||||
existing
|
||||
.Fx
|
||||
systems. It also contains some extra intelligence
|
||||
existing FreeBSD systems. It also contains some extra intelligence
|
||||
for running as a replacement for
|
||||
.Xr init 8
|
||||
when it's invoked by the
|
||||
.Fx
|
||||
installation boot procedure. It
|
||||
when it's invoked by the FreeBSD installation boot procedure. It
|
||||
assumes very little in the way of additional utility support and
|
||||
performs most file system operations by calling the relevant syscalls
|
||||
(such as
|
||||
@ -89,12 +79,11 @@ currently uses the
|
||||
library to do user interaction with simple ANSI line graphics, color
|
||||
support for which is enabled by either running on a syscons VTY or some
|
||||
other color-capable terminal emulator (newer versions of xterm will support
|
||||
color when using the
|
||||
.Dq xterm-color
|
||||
termcap entry).
|
||||
color when using the ``xterm-color'' termcap entry).
|
||||
.Pp
|
||||
This product is currently at the end of its life cycle and will
|
||||
eventually be replaced.
|
||||
utility.
|
||||
.Sh RUNNING SCRIPTS
|
||||
.Nm
|
||||
may be either driven interactively through its various internal menus
|
||||
@ -135,7 +124,7 @@ directive), upon reaching the end of the argument list or on error.
|
||||
For example:
|
||||
.nf
|
||||
|
||||
/stand/sysinstall _ftpPath=ftp://ziggy/pub/ mediaSetFTP configPackages
|
||||
/stand/sysinstall _ftpPath=ftp:/ziggy/pub/ mediaSetFTP configPackages
|
||||
|
||||
.fi
|
||||
Would initialize
|
||||
@ -189,11 +178,7 @@ loading any required 3rd-party routing daemons as necessary.
|
||||
.Bl -tag -width indent
|
||||
.It router
|
||||
can be set to the name of the desired routing daemon,
|
||||
e.g.
|
||||
.Dq routed
|
||||
or
|
||||
.Dq gated ,
|
||||
otherwise it is prompted for.
|
||||
e.g. ``routed'' or ``gated'', otherwise it is prompted for.
|
||||
.El
|
||||
.It configNFSServer
|
||||
Configure host as an NFS server.
|
||||
@ -241,27 +226,18 @@ change to geometry.
|
||||
.It partition
|
||||
Set to disk partitioning type or size, its value being
|
||||
.Ar free
|
||||
in order to use only remaining free space for
|
||||
.Fx ,
|
||||
in order to use only remaining free space for FreeBSD,
|
||||
.Ar all
|
||||
to use the entire disk for
|
||||
.Fx
|
||||
but maintain a proper partition
|
||||
to use the entire disk for FreeBSD but maintain a proper partition
|
||||
table,
|
||||
.Ar existing
|
||||
to use an existing
|
||||
.Fx
|
||||
partition (first found),
|
||||
to use an existing FreeBSD partition (first found),
|
||||
.Ar exclusive
|
||||
to use the disk in
|
||||
.Dq dangerously dedicated
|
||||
mode or, finally,
|
||||
to use the disk in ``dangerously dedicated'' mode or, finally,
|
||||
.Ar somenumber
|
||||
to allocate
|
||||
.Ar somenumber
|
||||
blocks of available free space to a new
|
||||
.Fx
|
||||
partition.
|
||||
blocks of available free space to a new FreeBSD partition.
|
||||
Default: Interactive mode.
|
||||
.It bootManager
|
||||
is set to one of
|
||||
@ -286,8 +262,7 @@ function) to be written out.
|
||||
\fBVariables:\fR None
|
||||
.It diskLabelEditor
|
||||
Invokes the disk label editor. This is a bit trickier from a script
|
||||
since you need to essentially label everything inside each
|
||||
.Fx
|
||||
since you need to essentially label everything inside each FreeBSD
|
||||
(type 0xA5) partition created by the
|
||||
.Ar diskPartitionEditor
|
||||
function, and that requires knowing a few rules about how things are
|
||||
@ -298,20 +273,15 @@ what the slice names will be, then and only then hardwiring them into
|
||||
the script.
|
||||
.Pp
|
||||
For example, let's say you have a SCSI disk on which you've created a new
|
||||
.Fx
|
||||
partition in slice 2 (your DOS partition residing in slice 1).
|
||||
FreeBSD partition in slice 2 (your DOS partition residing in slice 1).
|
||||
The slice name would be
|
||||
.Ar da0s2
|
||||
for the whole
|
||||
.Fx
|
||||
partition
|
||||
.Ar ( da0s1
|
||||
for the whole FreeBSD partition (
|
||||
.Ar da0s1
|
||||
being your DOS primary
|
||||
partition). Now let's further assume that you have 500MB in this
|
||||
partition and you want to sub-partition that space into root, swap,
|
||||
var and usr file systems for
|
||||
.Fx .
|
||||
Your invocation of the
|
||||
var and usr file systems for FreeBSD. Your invocation of the
|
||||
.Ar diskLabelEditor
|
||||
function might involve setting the following variables:
|
||||
.Bl -tag -width findx
|
||||
@ -366,12 +336,11 @@ Resets all selected distributions to the empty set (no distributions selected).
|
||||
.It distSetCustom
|
||||
Allows the selection of a custom distribution set (e.g. not just on of the
|
||||
existing "canned" sets) with no user interaction.
|
||||
|
||||
\fBVariables:\fR
|
||||
.Bl -tag -width indent
|
||||
.It dists
|
||||
List of distributions to load. Possible distribution values are:
|
||||
.Bl -tag -width indentxx
|
||||
.Bl -tag -width indent
|
||||
.It Li bin
|
||||
The base binary distribution.
|
||||
.It Li doc
|
||||
@ -391,31 +360,19 @@ GNU info files and other extra docs.
|
||||
.It Li des
|
||||
DES encryption binaries and libraries.
|
||||
.It Li compat1x
|
||||
Compatibility with
|
||||
.It Li 1.x
|
||||
Compatibility with FreeBSD 1.x
|
||||
.It Li compat20
|
||||
Compatibility with
|
||||
.Fx 2.0
|
||||
Compatibility with FreeBSD 2.0
|
||||
.It Li compat21
|
||||
Compatibility with
|
||||
.Fx 2.1
|
||||
.It Li compat22
|
||||
.Fx 2.2
|
||||
and
|
||||
.Fx 3.0
|
||||
a.out binary compatibility
|
||||
.It Li compat3x
|
||||
Compatibility with
|
||||
.It Li 3.x
|
||||
(available for
|
||||
.Fx 4.0
|
||||
systems only)
|
||||
Compatibility with FreeBSD 2.1
|
||||
.It Li ports
|
||||
The ports collection.
|
||||
.It Li krb
|
||||
Kerberos binaries.
|
||||
.It Li ssecure
|
||||
/usr/src/secure
|
||||
.It Li sebones
|
||||
/usr/src/eBones
|
||||
.It Li sbase
|
||||
/usr/src/[top level files]
|
||||
.It Li scontrib
|
||||
@ -524,8 +481,6 @@ XFree86 3.3.4 SVGA server.
|
||||
XFree86 3.3.4 VGA16 server.
|
||||
.It Li XW32
|
||||
XFree86 3.3.4 ET4000/W32, /W32i and /W32p server.
|
||||
.It Li XTGA
|
||||
Server for TGA cards (alpha architecture only).
|
||||
.It Li Xnest
|
||||
XFree86 3.3.4 nested X server.
|
||||
.It Li Xvfb
|
||||
@ -607,7 +562,6 @@ variable). Defaults to lynx.
|
||||
Commit any and all pending changes to disk. This function
|
||||
is essentially shorthand for a number of more granular "commit"
|
||||
functions.
|
||||
.Pp
|
||||
\fBVariables:\fR None
|
||||
.It installExpress
|
||||
Start an "express" installation, asking few questions of
|
||||
@ -657,9 +611,7 @@ configuration file from another.
|
||||
The fully pathname of the file to load.
|
||||
.El
|
||||
.It mediaSetCDROM
|
||||
Select a
|
||||
.Fx
|
||||
CDROM as the installation media.
|
||||
Select a FreeBSD CDROM as the installation media.
|
||||
.Pp
|
||||
\fBVariables:\fR None
|
||||
.It mediaSetFloppy
|
||||
@ -687,8 +639,8 @@ The domain name of the host being installed (optional).
|
||||
.It defaultrouter
|
||||
The default router for this host (non-optional).
|
||||
.It netDev
|
||||
Which host interface to use
|
||||
.Ar ( ed0
|
||||
Which host interface to use (
|
||||
.Ar ed0
|
||||
or
|
||||
.Ar ep0 ,
|
||||
for example. Non-optional).
|
||||
@ -700,10 +652,9 @@ The IP address for the selected host interface (non-optional).
|
||||
.It netmask
|
||||
The netmask for the selected host interface (non-optional).
|
||||
.It _ftpPath
|
||||
The fully qualified URL of the FTP site containing the
|
||||
.Fx
|
||||
The fully qualified URL of the FTP site containing the FreeBSD
|
||||
distribution you're interested in, e.g.
|
||||
.Ar ftp://ftp.FreeBSD.org/pub/FreeBSD/ .
|
||||
.Ar ftp://ftp.freebsd.org/pub/FreeBSD/ .
|
||||
.El
|
||||
.It mediaSetFTPActive
|
||||
Alias for
|
||||
@ -726,9 +677,7 @@ the installation media.
|
||||
\fBVariables:\fR
|
||||
.Bl -tag -width indent
|
||||
.It ufs
|
||||
full /path to directory containing the
|
||||
.Fx
|
||||
distribution you're
|
||||
full /path to directory containing the FreeBSD distribution you're
|
||||
interested in.
|
||||
.El
|
||||
.It mediaSetNFS
|
||||
@ -742,8 +691,8 @@ The domain name of the host being installed (optional).
|
||||
.It defaultrouter
|
||||
The default router for this host (non-optional).
|
||||
.It netDev
|
||||
Which host interface to use
|
||||
.Ar ( ed0
|
||||
Which host interface to use (
|
||||
.Ar ed0
|
||||
or
|
||||
.Ar ep0 ,
|
||||
for example. Non-optional).
|
||||
@ -756,9 +705,7 @@ The IP address for the selected host interface (non-optional).
|
||||
The netmask for the selected host interface (non-optional).
|
||||
.It nfs
|
||||
full hostname:/path specification for directory containing
|
||||
the
|
||||
.Fx
|
||||
distribution you're interested in.
|
||||
the FreeBSD distribution you're interested in.
|
||||
.El
|
||||
.It mediaSetFTPUserPass
|
||||
.Pp
|
||||
|
@ -160,7 +160,6 @@
|
||||
#define VAR_SLOW_ETHER "slowEthernetCard"
|
||||
#define VAR_SWAP_SIZE "swapSize"
|
||||
#define VAR_TAPE_BLOCKSIZE "tapeBlocksize"
|
||||
#define VAR_TRY_DHCP "tryDHCP"
|
||||
#define VAR_UFS_PATH "ufs"
|
||||
#define VAR_USR_SIZE "usrSize"
|
||||
#define VAR_VAR_SIZE "varSize"
|
||||
@ -319,7 +318,6 @@ typedef int (*commandFunc)(char *key, void *data);
|
||||
|
||||
/* This is the structure that Network devices carry around in their private, erm, structures */
|
||||
typedef struct _devPriv {
|
||||
int use_dhcp;
|
||||
char ipaddr[IPADDR_FIELD_LEN];
|
||||
char netmask[IPADDR_FIELD_LEN];
|
||||
char extras[EXTRAS_FIELD_LEN];
|
||||
@ -453,10 +451,6 @@ extern Boolean dummyInit(Device *dev);
|
||||
extern FILE *dummyGet(Device *dev, char *dist, Boolean probe);
|
||||
extern void dummyShutdown(Device *dev);
|
||||
|
||||
/* dhcp.c */
|
||||
extern int dhcpParseLeases(char *file, char *hostname, char *domain, char *nameserver,
|
||||
char *ipaddr, char *gateway, char *netmask);
|
||||
|
||||
/* disks.c */
|
||||
extern int diskPartitionEditor(dialogMenuItem *self);
|
||||
extern int diskPartitionWrite(dialogMenuItem *self);
|
||||
|
@ -71,9 +71,7 @@ expand(char *fname)
|
||||
void
|
||||
systemInitialize(int argc, char **argv)
|
||||
{
|
||||
#ifdef __alpha__
|
||||
int i;
|
||||
#endif
|
||||
|
||||
signal(SIGINT, SIG_IGN);
|
||||
globalsInit();
|
||||
@ -111,15 +109,11 @@ systemInitialize(int argc, char **argv)
|
||||
close(1); dup(0);
|
||||
close(2); dup(0);
|
||||
printf("%s running as init on %s\n", argv[0], OnVTY ? "vty0" : "serial console");
|
||||
ioctl(0, TIOCSCTTY, (char *)NULL);
|
||||
i = ioctl(0, TIOCSCTTY, (char *)NULL);
|
||||
setlogin("root");
|
||||
setenv("PATH", "/stand:/bin:/sbin:/usr/sbin:/usr/bin:/mnt/bin:/mnt/sbin:/mnt/usr/sbin:/mnt/usr/bin:/usr/X11R6/bin", 1);
|
||||
setbuf(stdin, 0);
|
||||
setbuf(stderr, 0);
|
||||
#ifdef __alpha__
|
||||
i = 0;
|
||||
sysctlbyname("machdep.unaligned_print", NULL, 0, &i, sizeof(i));
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
char hname[256];
|
||||
@ -353,7 +347,7 @@ systemCreateHoloshell(void)
|
||||
if (kill(ehs_pid, 0) == 0) {
|
||||
|
||||
if (msgYesNo("There seems to be an emergency holographic shell\n"
|
||||
"already running on VTY 4.\n\n"
|
||||
"already running on VTY 4.\n"
|
||||
"Kill it and start a new one?"))
|
||||
return;
|
||||
|
||||
|
@ -39,7 +39,6 @@
|
||||
|
||||
#include "sysinstall.h"
|
||||
#include <sys/param.h>
|
||||
#include <netdb.h>
|
||||
|
||||
/* The help file for the TCP/IP setup screen */
|
||||
#define TCP_HELPFILE "tcp"
|
||||
@ -146,53 +145,6 @@ verifySettings(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
dhcpGetInfo(Device *devp)
|
||||
{
|
||||
/* If it fails, do it the old-fashioned way */
|
||||
if (dhcpParseLeases("/var/db/dhclient.leases", hostname, domainname,
|
||||
nameserver, ipaddr, gateway, netmask) == -1) {
|
||||
FILE *ifp;
|
||||
char *cp, cmd[256], data[2048];
|
||||
int i, j;
|
||||
|
||||
/* Bah, now we have to kludge getting the information from ifconfig */
|
||||
snprintf(cmd, sizeof cmd, "ifconfig %s", devp->name);
|
||||
ifp = popen(cmd, "r");
|
||||
if (ifp) {
|
||||
j = fread(data, 1, sizeof(data), ifp);
|
||||
fclose(ifp);
|
||||
if (j < 0) /* paranoia */
|
||||
j = 0;
|
||||
data[j] = '\0';
|
||||
if (isDebug())
|
||||
msgDebug("DHCP configured interface returns %s\n", data);
|
||||
/* XXX This is gross as it assumes a certain ordering to
|
||||
ifconfig's output! XXX */
|
||||
if ((cp = strstr(data, "inet")) != NULL) {
|
||||
i = 0;
|
||||
cp += 5; /* move over keyword */
|
||||
while (*cp != ' ')
|
||||
ipaddr[i++] = *(cp++);
|
||||
ipaddr[i] = '\0';
|
||||
if (!strncmp(++cp, "netmask", 7)) {
|
||||
i = 0;
|
||||
cp += 8;
|
||||
while (*cp != ' ')
|
||||
netmask[i++] = *(cp++);
|
||||
netmask[i] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If we didn't get a name server value, hunt for it in resolv.conf */
|
||||
if (!nameserver[0] && file_readable("/etc/resolv.conf"))
|
||||
configEnvironmentResolv("/etc/resolv.conf");
|
||||
if (hostname[0])
|
||||
variable_set2(VAR_HOSTNAME, hostname, 0);
|
||||
}
|
||||
|
||||
/* This is it - how to get TCP setup values */
|
||||
int
|
||||
tcpOpenDialog(Device *devp)
|
||||
@ -201,7 +153,6 @@ tcpOpenDialog(Device *devp)
|
||||
ComposeObj *obj = NULL;
|
||||
int n = 0, filled = 0, cancel = FALSE;
|
||||
int max, ret = DITEM_SUCCESS;
|
||||
int use_dhcp = FALSE;
|
||||
char *tmp;
|
||||
char title[80];
|
||||
|
||||
@ -212,46 +163,22 @@ tcpOpenDialog(Device *devp)
|
||||
SAFE_STRCPY(ipaddr, di->ipaddr);
|
||||
SAFE_STRCPY(netmask, di->netmask);
|
||||
SAFE_STRCPY(extras, di->extras);
|
||||
use_dhcp = di->use_dhcp;
|
||||
}
|
||||
else { /* See if there are any defaults */
|
||||
char *cp;
|
||||
|
||||
/* First try a DHCP scan if such behavior is desired */
|
||||
if (!variable_cmp(VAR_TRY_DHCP, "YES") || !msgYesNo("Do you want to try DHCP configuration of the interface?")) {
|
||||
int k;
|
||||
|
||||
Mkdir("/var/db");
|
||||
Mkdir("/var/run");
|
||||
Mkdir("/tmp");
|
||||
msgNotify("Scanning for DHCP servers...");
|
||||
for (k = 1; k < 4; k++) {
|
||||
if (0 == vsystem("dhclient -1 %s", devp->name)) {
|
||||
dhcpGetInfo(devp);
|
||||
use_dhcp = TRUE;
|
||||
break;
|
||||
}
|
||||
msgNotify("Scanning for DHCP servers... Retry: %d", k);
|
||||
}
|
||||
}
|
||||
|
||||
/* Get old IP address from variable space, if available */
|
||||
if (!ipaddr[0]) {
|
||||
if ((cp = variable_get(VAR_IPADDR)) != NULL)
|
||||
SAFE_STRCPY(ipaddr, cp);
|
||||
else if ((cp = variable_get(string_concat3(devp->name, "_", VAR_IPADDR))) != NULL)
|
||||
SAFE_STRCPY(ipaddr, cp);
|
||||
}
|
||||
|
||||
/* Get old netmask from variable space, if available */
|
||||
if (!netmask[0]) {
|
||||
if ((cp = variable_get(VAR_NETMASK)) != NULL)
|
||||
SAFE_STRCPY(netmask, cp);
|
||||
else if ((cp = variable_get(string_concat3(devp->name, "_", VAR_NETMASK))) != NULL)
|
||||
SAFE_STRCPY(netmask, cp);
|
||||
}
|
||||
|
||||
/* Get old extras string from variable space, if available */
|
||||
if (!extras[0]) {
|
||||
if ((cp = variable_get(VAR_EXTRAS)) != NULL)
|
||||
SAFE_STRCPY(extras, cp);
|
||||
@ -261,26 +188,26 @@ tcpOpenDialog(Device *devp)
|
||||
}
|
||||
|
||||
/* Look up values already recorded with the system, or blank the string variables ready to accept some new data */
|
||||
if (!hostname[0]) {
|
||||
tmp = variable_get(VAR_HOSTNAME);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(hostname, tmp);
|
||||
}
|
||||
if (!domainname[0]) {
|
||||
tmp = variable_get(VAR_DOMAINNAME);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(domainname, tmp);
|
||||
}
|
||||
if (!gateway[0]) {
|
||||
tmp = variable_get(VAR_GATEWAY);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(gateway, tmp);
|
||||
}
|
||||
if (!nameserver[0]) {
|
||||
tmp = variable_get(VAR_NAMESERVER);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(nameserver, tmp);
|
||||
}
|
||||
tmp = variable_get(VAR_HOSTNAME);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(hostname, tmp);
|
||||
else
|
||||
bzero(hostname, sizeof(hostname));
|
||||
tmp = variable_get(VAR_DOMAINNAME);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(domainname, tmp);
|
||||
else
|
||||
bzero(domainname, sizeof(domainname));
|
||||
tmp = variable_get(VAR_GATEWAY);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(gateway, tmp);
|
||||
else
|
||||
bzero(gateway, sizeof(gateway));
|
||||
tmp = variable_get(VAR_NAMESERVER);
|
||||
if (tmp)
|
||||
SAFE_STRCPY(nameserver, tmp);
|
||||
else
|
||||
bzero(nameserver, sizeof(nameserver));
|
||||
|
||||
save = savescr();
|
||||
/* If non-interactive, jump straight over the dialog crap and into config section */
|
||||
@ -325,7 +252,7 @@ tcpOpenDialog(Device *devp)
|
||||
* the most appropriate one (entire class C, or subnetted
|
||||
* class A/B network).
|
||||
*/
|
||||
if (!netmask[0]) {
|
||||
if (netmask[0] == '\0') {
|
||||
strcpy(netmask, "255.255.255.0");
|
||||
RefreshStringObj(layout[LAYOUT_NETMASK].obj);
|
||||
++filled;
|
||||
@ -361,18 +288,14 @@ tcpOpenDialog(Device *devp)
|
||||
char temp[512], ifn[255];
|
||||
char *ifaces;
|
||||
|
||||
if (hostname[0]) {
|
||||
variable_set2(VAR_HOSTNAME, hostname, use_dhcp ? 0 : 1);
|
||||
sethostname(hostname, strlen(hostname));
|
||||
}
|
||||
variable_set2(VAR_HOSTNAME, hostname, 1);
|
||||
sethostname(hostname, strlen(hostname));
|
||||
if (domainname[0])
|
||||
variable_set2(VAR_DOMAINNAME, domainname, 0);
|
||||
if (gateway[0])
|
||||
variable_set2(VAR_GATEWAY, gateway, use_dhcp ? 0 : 1);
|
||||
variable_set2(VAR_GATEWAY, gateway, 1);
|
||||
if (nameserver[0])
|
||||
variable_set2(VAR_NAMESERVER, nameserver, 0);
|
||||
if (ipaddr[0])
|
||||
variable_set2(VAR_IPADDR, ipaddr, 0);
|
||||
|
||||
if (!devp->private)
|
||||
devp->private = (DevInfo *)safe_malloc(sizeof(DevInfo));
|
||||
@ -380,13 +303,9 @@ tcpOpenDialog(Device *devp)
|
||||
SAFE_STRCPY(di->ipaddr, ipaddr);
|
||||
SAFE_STRCPY(di->netmask, netmask);
|
||||
SAFE_STRCPY(di->extras, extras);
|
||||
di->use_dhcp = use_dhcp;
|
||||
|
||||
sprintf(temp, "inet %s %s netmask %s", ipaddr, extras, netmask);
|
||||
sprintf(ifn, "%s%s", VAR_IFCONFIG, devp->name);
|
||||
if (use_dhcp)
|
||||
sprintf(temp, "DHCP");
|
||||
else
|
||||
sprintf(temp, "inet %s %s netmask %s", ipaddr, extras, netmask);
|
||||
variable_set2(ifn, temp, 1);
|
||||
ifaces = variable_get(VAR_INTERFACES);
|
||||
if (!ifaces)
|
||||
@ -396,8 +315,9 @@ tcpOpenDialog(Device *devp)
|
||||
sprintf(ifn, "%s %s", devp->name, ifaces);
|
||||
variable_set2(VAR_INTERFACES, ifn, 1);
|
||||
}
|
||||
if (!use_dhcp)
|
||||
configResolv(NULL); /* XXX this will do it on the MFS copy XXX */
|
||||
if (ipaddr[0])
|
||||
variable_set2(VAR_IPADDR, ipaddr, 0);
|
||||
configResolv(NULL); /* XXX this will do it on the MFS copy XXX */
|
||||
ret = DITEM_SUCCESS;
|
||||
}
|
||||
else
|
||||
@ -476,7 +396,7 @@ tcpMenuSelect(dialogMenuItem *self)
|
||||
Device *tmp;
|
||||
|
||||
tmp = tcpDeviceSelect();
|
||||
if (tmp && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (tmp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (!tmp->init(tmp))
|
||||
msgConfirm("Initialization of %s device failed.", tmp->name);
|
||||
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||
|
@ -58,8 +58,7 @@ make_variable(char *var, char *value, int dirty)
|
||||
setenv(var, value, 1);
|
||||
free(vp->value);
|
||||
vp->value = strdup(value);
|
||||
if (dirty != -1)
|
||||
vp->dirty = dirty;
|
||||
vp->dirty = dirty;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -69,8 +68,6 @@ make_variable(char *var, char *value, int dirty)
|
||||
vp = (Variable *)safe_malloc(sizeof(Variable));
|
||||
vp->name = strdup(var);
|
||||
vp->value = strdup(value);
|
||||
if (dirty == -1)
|
||||
dirty = 0;
|
||||
vp->dirty = dirty;
|
||||
vp->next = VarHead;
|
||||
VarHead = vp;
|
||||
|
Loading…
Reference in New Issue
Block a user