summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1999-09-02 00:51:16 +0000
committerjkh <jkh@FreeBSD.org>1999-09-02 00:51:16 +0000
commit2b983202e6de74a0ad0fc2765f080543e3895b9f (patch)
tree056879bb90e16442c3b7d9bc3de1330e328d93b9 /usr.sbin/sade
parent3e73f6e0b13a943ed99fc8f5f463a7a251c2e797 (diff)
downloadFreeBSD-src-2b983202e6de74a0ad0fc2765f080543e3895b9f.zip
FreeBSD-src-2b983202e6de74a0ad0fc2765f080543e3895b9f.tar.gz
Oh crud, did I ever screw the pooch! Rather than sync this with -stable,
I backed-out the changes in -current and didn't touch stable at all (I thought I had my patch order reversed, not what actually happened). AIEEE! I can't even blame the crack for this one since I broke my crack pipe a few weeks ago. I think sleep deprivation gets the blame for this one. Medal for noticing this one goes to: Jim Bloom <bloom@acm.org>
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/Makefile3
-rw-r--r--usr.sbin/sade/config.c2
-rw-r--r--usr.sbin/sade/devices.c15
-rw-r--r--usr.sbin/sade/disks.c16
-rw-r--r--usr.sbin/sade/install.c8
-rw-r--r--usr.sbin/sade/menus.c39
-rw-r--r--usr.sbin/sade/sade.8123
-rw-r--r--usr.sbin/sade/sade.h6
-rw-r--r--usr.sbin/sade/system.c10
-rw-r--r--usr.sbin/sade/variable.c5
10 files changed, 161 insertions, 66 deletions
diff --git a/usr.sbin/sade/Makefile b/usr.sbin/sade/Makefile
index 6e53c1f..609ef7b 100644
--- a/usr.sbin/sade/Makefile
+++ b/usr.sbin/sade/Makefile
@@ -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 kget.c \
+SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.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,7 +19,6 @@ SRCS= anonFTP.c cdrom.c command.c config.c devices.c kget.c \
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR}
CFLAGS+= -I${.CURDIR}/../../sys
-CFLAGS+= -DUC_PRIVATE -DKERN_NO_SYMBOLS
PCCARD?= NO
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c
index f9b6200..9eaa21d 100644
--- a/usr.sbin/sade/config.c
+++ b/usr.sbin/sade/config.c
@@ -453,7 +453,7 @@ configLinux(dialogMenuItem *self)
{
variable_set2(VAR_LINUX_ENABLE, "YES", 1);
msgNotify("Installing Linux compatibility library...");
- return package_add("linux_lib");
+ return package_add("linux_base");
}
static void
diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c
index 86072e1..f0df3a2 100644
--- a/usr.sbin/sade/devices.c
+++ b/usr.sbin/sade/devices.c
@@ -99,15 +99,16 @@ 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, "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, "ste", "Sundance ST201 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" },
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c
index f820976..fe4ee82 100644
--- a/usr.sbin/sade/disks.c
+++ b/usr.sbin/sade/disks.c
@@ -455,20 +455,16 @@ 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)) != NULL)
- Set_Boot_Mgr(d, mbrContents);
-#endif
-
+ if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1)))
+ mbrContents = getBootMgr(d->name);
+ else
+ mbrContents = NULL;
+ Set_Boot_Mgr(d, mbrContents);
+
if (DITEM_STATUS(diskPartitionWrite(NULL)) != DITEM_SUCCESS)
msgConfirm("Disk partition write returned an error status!");
else
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index c4873ca..841dd1a 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -533,7 +533,7 @@ nodisks:
dialog_clear_norefresh();
tmp = tcpDeviceSelect();
dialog_clear_norefresh();
- if (tmp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
+ if (tmp && !((DevInfo *)tmp->private)->use_dhcp && !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,6 +754,8 @@ 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);
}
}
@@ -1031,6 +1033,7 @@ 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";
@@ -1039,13 +1042,14 @@ 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, "YES", 0);
+ variable_set2(VAR_NFS_SECURE, "NO", -1);
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;
}
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index bfe6cb9..c626af8 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/menus.c
@@ -254,7 +254,9 @@ 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" },
@@ -295,7 +297,9 @@ 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 } },
};
@@ -428,6 +432,10 @@ 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"
@@ -435,14 +443,20 @@ 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 } },
@@ -636,6 +650,8 @@ 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,
@@ -788,6 +804,7 @@ 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",
@@ -800,6 +817,7 @@ DMenu MenuSubDistributions = {
{ "compat3x", "FreeBSD 3.x binary compatibility",
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT3X },
#endif
+#endif
{ "DES", "DES encryption code - NOT FOR EXPORT!",
DESFlagCheck, distSetDES },
{ "dict", "Spelling checker dictionary files",
@@ -820,6 +838,8 @@ 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",
@@ -934,8 +954,10 @@ 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",
@@ -944,8 +966,10 @@ 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",
@@ -1026,8 +1050,13 @@ 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",
@@ -1037,6 +1066,7 @@ DMenu MenuXF86SelectServer = {
{ NULL } },
};
+#ifdef __i386__
DMenu MenuXF86SelectPC98Server = {
DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
"PC98 X Server selection.",
@@ -1078,6 +1108,7 @@ Mono servers are particularly well-suited to most LCD displays).",
checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
{ NULL } }
};
+#endif
DMenu MenuDiskDevices = {
DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
@@ -1177,8 +1208,10 @@ 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",
@@ -1350,12 +1383,6 @@ 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 } },
};
diff --git a/usr.sbin/sade/sade.8 b/usr.sbin/sade/sade.8
index 5186312..19ed764 100644
--- a/usr.sbin/sade/sade.8
+++ b/usr.sbin/sade/sade.8
@@ -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,11 +37,17 @@
.Op Ar ...
.Sh DESCRIPTION
.Nm
-is a utility for installing and configuring FreeBSD systems.
-It is the first utility invoked by the FreeBSD installation boot
+is a utility for installing and configuring
+.Fx
+systems.
+It is the first utility invoked by the
+.Fx
+installation boot
floppy and is also copied into
.Pa /stand/sysinstall
-on newly installed FreeBSD systems for use in later configuring the system.
+on newly installed
+.Fx
+systems for use in later configuring the system.
.Pp
The
.Nm
@@ -63,10 +69,14 @@ 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 FreeBSD systems. It also contains some extra intelligence
+existing
+.Fx
+systems. It also contains some extra intelligence
for running as a replacement for
.Xr init 8
-when it's invoked by the FreeBSD installation boot procedure. It
+when it's invoked by the
+.Fx
+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
@@ -79,11 +89,12 @@ 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 ``xterm-color'' termcap entry).
+color when using the
+.Dq 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
@@ -124,7 +135,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
@@ -178,7 +189,11 @@ 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. ``routed'' or ``gated'', otherwise it is prompted for.
+e.g.
+.Dq routed
+or
+.Dq gated ,
+otherwise it is prompted for.
.El
.It configNFSServer
Configure host as an NFS server.
@@ -226,18 +241,27 @@ 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 FreeBSD,
+in order to use only remaining free space for
+.Fx ,
.Ar all
-to use the entire disk for FreeBSD but maintain a proper partition
+to use the entire disk for
+.Fx
+but maintain a proper partition
table,
.Ar existing
-to use an existing FreeBSD partition (first found),
+to use an existing
+.Fx
+partition (first found),
.Ar exclusive
-to use the disk in ``dangerously dedicated'' mode or, finally,
+to use the disk in
+.Dq dangerously dedicated
+mode or, finally,
.Ar somenumber
to allocate
.Ar somenumber
-blocks of available free space to a new FreeBSD partition.
+blocks of available free space to a new
+.Fx
+partition.
Default: Interactive mode.
.It bootManager
is set to one of
@@ -262,7 +286,8 @@ 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 FreeBSD
+since you need to essentially label everything inside each
+.Fx
(type 0xA5) partition created by the
.Ar diskPartitionEditor
function, and that requires knowing a few rules about how things are
@@ -273,15 +298,20 @@ 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
-FreeBSD partition in slice 2 (your DOS partition residing in slice 1).
+.Fx
+partition in slice 2 (your DOS partition residing in slice 1).
The slice name would be
.Ar da0s2
-for the whole FreeBSD partition (
-.Ar da0s1
+for the whole
+.Fx
+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 FreeBSD. Your invocation of the
+var and usr file systems for
+.Fx .
+Your invocation of the
.Ar diskLabelEditor
function might involve setting the following variables:
.Bl -tag -width findx
@@ -336,11 +366,12 @@ 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 indent
+.Bl -tag -width indentxx
.It Li bin
The base binary distribution.
.It Li doc
@@ -360,19 +391,31 @@ GNU info files and other extra docs.
.It Li des
DES encryption binaries and libraries.
.It Li compat1x
-Compatibility with FreeBSD 1.x
+Compatibility with
+.It Li 1.x
.It Li compat20
-Compatibility with FreeBSD 2.0
+Compatibility with
+.Fx 2.0
.It Li compat21
-Compatibility with FreeBSD 2.1
+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)
.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
@@ -481,6 +524,8 @@ 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
@@ -562,6 +607,7 @@ 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
@@ -611,7 +657,9 @@ configuration file from another.
The fully pathname of the file to load.
.El
.It mediaSetCDROM
-Select a FreeBSD CDROM as the installation media.
+Select a
+.Fx
+CDROM as the installation media.
.Pp
\fBVariables:\fR None
.It mediaSetFloppy
@@ -639,8 +687,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).
@@ -652,9 +700,10 @@ 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 FreeBSD
+The fully qualified URL of the FTP site containing the
+.Fx
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
@@ -677,7 +726,9 @@ the installation media.
\fBVariables:\fR
.Bl -tag -width indent
.It ufs
-full /path to directory containing the FreeBSD distribution you're
+full /path to directory containing the
+.Fx
+distribution you're
interested in.
.El
.It mediaSetNFS
@@ -691,8 +742,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).
@@ -705,7 +756,9 @@ 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 FreeBSD distribution you're interested in.
+the
+.Fx
+distribution you're interested in.
.El
.It mediaSetFTPUserPass
.Pp
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index edf12ab..7db1baa 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -160,6 +160,7 @@
#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"
@@ -318,6 +319,7 @@ 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];
@@ -451,6 +453,10 @@ 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);
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c
index d46ff5d..fc57fe3 100644
--- a/usr.sbin/sade/system.c
+++ b/usr.sbin/sade/system.c
@@ -71,7 +71,9 @@ expand(char *fname)
void
systemInitialize(int argc, char **argv)
{
+#ifdef __alpha__
int i;
+#endif
signal(SIGINT, SIG_IGN);
globalsInit();
@@ -109,11 +111,15 @@ 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");
- i = ioctl(0, TIOCSCTTY, (char *)NULL);
+ 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];
@@ -347,7 +353,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"
+ "already running on VTY 4.\n\n"
"Kill it and start a new one?"))
return;
diff --git a/usr.sbin/sade/variable.c b/usr.sbin/sade/variable.c
index 40f2284..1e2bf9a 100644
--- a/usr.sbin/sade/variable.c
+++ b/usr.sbin/sade/variable.c
@@ -58,7 +58,8 @@ make_variable(char *var, char *value, int dirty)
setenv(var, value, 1);
free(vp->value);
vp->value = strdup(value);
- vp->dirty = dirty;
+ if (dirty != -1)
+ vp->dirty = dirty;
return;
}
}
@@ -68,6 +69,8 @@ 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;
OpenPOWER on IntegriCloud