mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 08:22:44 +00:00
Several areas of improvement:
o Incorporate some of Tatsumi's bug fixes. o Remove the xperimnt and commerce distribution items; they haven't been actual distributions for awhile. o Try to sanitize the device checking code a little more. o Cosmetic work on the network code.
This commit is contained in:
parent
5703427770
commit
ba5555f0e6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=20208
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: devices.c,v 1.50 1996/11/15 19:53:08 jkh Exp $
|
||||
* $Id: devices.c,v 1.51 1996/11/27 01:01:52 joerg Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -80,7 +80,7 @@ static struct {
|
||||
{ DEVICE_TYPE_NETWORK, "ppp", "Point-to-Point Protocol (PPP) interface" },
|
||||
{ DEVICE_TYPE_NETWORK, "de", "DEC DE435 PCI NIC or other DC21040-AA based card" },
|
||||
{ DEVICE_TYPE_NETWORK, "fxp", "Intel EtherExpress Pro/100B PCI Fast Ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ed", "WD/SMC 80xx; Novell NE1000/2000; 3Com 3C503 cards" },
|
||||
{ DEVICE_TYPE_NETWORK, "ed", "WD/SMC 80xx; Novell NE1000/2000; 3Com 3C503 card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ep", "3Com 3C509 ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "el", "3Com 3C501 ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "fe", "Fujitsu MB86960A/MB86965A ethernet card" },
|
||||
@ -200,7 +200,7 @@ deviceGetAll(void)
|
||||
msgFatal("Unable to open disk %s", names[i]);
|
||||
|
||||
(void)deviceRegister(names[i], names[i], d->name, DEVICE_TYPE_DISK, FALSE, NULL, NULL, NULL, NULL, d);
|
||||
msgDebug("Found a device of type disk named: %s\n", names[i]);
|
||||
msgDebug("Found a disk device named %s\n", names[i]);
|
||||
|
||||
/* Look for existing DOS partitions to register */
|
||||
for (c1 = d->chunks->part; c1; c1 = c1->next) {
|
||||
@ -227,11 +227,11 @@ deviceGetAll(void)
|
||||
s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (s < 0) {
|
||||
msgConfirm("ifconfig: socket");
|
||||
return;
|
||||
goto skipif; /* Jump over network iface probing */
|
||||
}
|
||||
if (ioctl(s, SIOCGIFCONF, (char *) &ifc) < 0) {
|
||||
msgConfirm("ifconfig (SIOCGIFCONF)");
|
||||
return;
|
||||
goto skipif; /* Jump over network iface probing */
|
||||
}
|
||||
ifflags = ifc.ifc_req->ifr_flags;
|
||||
end = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);
|
||||
@ -241,12 +241,13 @@ deviceGetAll(void)
|
||||
/* If it's not a link entry, forget it */
|
||||
if (ifptr->ifr_ifru.ifru_addr.sa_family != AF_LINK)
|
||||
continue;
|
||||
|
||||
/* Eliminate network devices that don't make sense */
|
||||
if (!strncmp(ifptr->ifr_name, "tun", 3)
|
||||
|| !strncmp(ifptr->ifr_name, "lo0", 3))
|
||||
if (!strncmp(ifptr->ifr_name, "tun", 3) || !strncmp(ifptr->ifr_name, "lo0", 3))
|
||||
continue;
|
||||
descr = NULL;
|
||||
for (i = 0; device_names[i].name; i++) {
|
||||
|
||||
/* Try and find its description */
|
||||
for (i = 0, descr = NULL; device_names[i].name; i++) {
|
||||
int len = strlen(device_names[i].name);
|
||||
|
||||
if (!strncmp(ifptr->ifr_name, device_names[i].name, len)) {
|
||||
@ -256,9 +257,10 @@ deviceGetAll(void)
|
||||
}
|
||||
if (!descr)
|
||||
descr = "<unknown network interface type>";
|
||||
|
||||
deviceRegister(ifptr->ifr_name, descr, strdup(ifptr->ifr_name), DEVICE_TYPE_NETWORK, TRUE,
|
||||
mediaInitNetwork, NULL, NULL, mediaShutdownNetwork, NULL);
|
||||
msgDebug("Found a device of type network named: %s\n", ifptr->ifr_name);
|
||||
msgDebug("Found a network device named %s\n", ifptr->ifr_name);
|
||||
close(s);
|
||||
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
|
||||
msgConfirm("ifconfig: socket");
|
||||
@ -268,6 +270,7 @@ deviceGetAll(void)
|
||||
ifptr = (struct ifreq *)((caddr_t)ifptr + ifptr->ifr_addr.sa_len - sizeof(struct sockaddr));
|
||||
}
|
||||
|
||||
skipif:
|
||||
/* Finally, try to find all the types of devices one might need
|
||||
* during the second stage of the installation.
|
||||
*/
|
||||
@ -283,7 +286,7 @@ deviceGetAll(void)
|
||||
(void)deviceRegister(device_names[i].name, device_names[i].description, strdup(try),
|
||||
DEVICE_TYPE_CDROM, TRUE, mediaInitCDROM, mediaGetCDROM, NULL,
|
||||
mediaShutdownCDROM, NULL);
|
||||
msgDebug("Found a device of type CDROM named: %s\n", device_names[i].name);
|
||||
msgDebug("Found a CDROM device named %s\n", device_names[i].name);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -293,7 +296,7 @@ deviceGetAll(void)
|
||||
if (fd) close(fd);
|
||||
deviceRegister(device_names[i].name, device_names[i].description, strdup(try),
|
||||
DEVICE_TYPE_TAPE, TRUE, mediaInitTape, mediaGetTape, NULL, mediaShutdownTape, NULL);
|
||||
msgDebug("Found a device of type TAPE named: %s\n", device_names[i].name);
|
||||
msgDebug("Found a TAPE device named %s\n", device_names[i].name);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -304,7 +307,7 @@ deviceGetAll(void)
|
||||
deviceRegister(device_names[i].name, device_names[i].description, strdup(try),
|
||||
DEVICE_TYPE_FLOPPY, TRUE, mediaInitFloppy, mediaGetFloppy, NULL,
|
||||
mediaShutdownFloppy, NULL);
|
||||
msgDebug("Found a device of type floppy named: %s\n", device_names[i].name);
|
||||
msgDebug("Found a floppy device named %s\n", device_names[i].name);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -327,7 +330,7 @@ deviceGetAll(void)
|
||||
sprintf(newdesc, cp, "PPP interface");
|
||||
deviceRegister("ppp0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork,
|
||||
NULL, NULL, mediaShutdownNetwork, NULL);
|
||||
msgDebug("Found a device of type network named: %s\n", device_names[i].name);
|
||||
msgDebug("Found a serial network device named %s on %s\n", device_names[i].name, try);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: dist.c,v 1.78 1996/11/09 19:26:01 jkh Exp $
|
||||
* $Id: dist.c,v 1.79 1996/11/09 19:47:24 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -73,8 +73,6 @@ static Distribution DistTable[] = {
|
||||
{ "compat1x", "/", &Dists, DIST_COMPAT1X, NULL },
|
||||
{ "compat20", "/", &Dists, DIST_COMPAT20, NULL },
|
||||
{ "compat21", "/", &Dists, DIST_COMPAT21, NULL },
|
||||
{ "commerce", "/usr/local", &Dists, DIST_COMMERCIAL, NULL },
|
||||
{ "xperimnt", "/usr/local", &Dists, DIST_EXPERIMENTAL, NULL },
|
||||
{ "XF8632", "/usr", &Dists, DIST_XF86, XF86DistTable },
|
||||
{ NULL },
|
||||
};
|
||||
|
@ -14,10 +14,8 @@
|
||||
#define DIST_COMPAT20 0x0200
|
||||
#define DIST_COMPAT21 0x0400
|
||||
#define DIST_XF86 0x0800
|
||||
#define DIST_COMMERCIAL 0x1000
|
||||
#define DIST_DES 0x2000
|
||||
#define DIST_EXPERIMENTAL 0x4000
|
||||
#define DIST_ALL 0xFFFF
|
||||
#define DIST_DES 0x1000
|
||||
#define DIST_ALL 0x1FFF
|
||||
|
||||
/* Canned distribution sets */
|
||||
#define _DIST_DEVELOPER \
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: installUpgrade.c,v 1.32 1996/09/18 18:40:37 jkh Exp $
|
||||
* $Id: installUpgrade.c,v 1.33 1996/10/09 09:53:35 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -291,7 +291,7 @@ installUpgrade(dialogMenuItem *self)
|
||||
msgNotify("Preserving /etc directory..");
|
||||
if (vsystem("tar -cf - -C /etc . | tar -xpf - -C %s", saved_etc))
|
||||
if (msgYesNo("Unable to backup your /etc into %s.\n"
|
||||
"Do you want to continue anyway?") != 0)
|
||||
"Do you want to continue anyway?", saved_etc) != 0)
|
||||
return DITEM_FAILURE | DITEM_RECREATE;
|
||||
}
|
||||
if (file_readable("/kernel")) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: menus.c,v 1.97 1996/11/27 12:44:43 jkh Exp $
|
||||
* $Id: menus.c,v 1.98 1996/11/29 23:52:20 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -641,8 +641,6 @@ DMenu MenuSubDistributions = {
|
||||
NULL,
|
||||
{ { "bin", "Binary base distribution (required) [36M]",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BIN },
|
||||
{ "commerce", "Commercial and shareware demos [10M]",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMMERCIAL },
|
||||
{ "compat1x", "FreeBSD 1.x binary compatibility [2M]",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT1X },
|
||||
{ "compat20", "FreeBSD 2.0 binary compatibility [2M]",
|
||||
@ -667,8 +665,6 @@ DMenu MenuSubDistributions = {
|
||||
srcFlagCheck, distSetSrc },
|
||||
{ "XFree86", "The XFree86 3.2 distribution",
|
||||
x11FlagCheck, distSetXF86 },
|
||||
{ "xperimnt", "Experimental work in progress!",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_EXPERIMENTAL },
|
||||
{ "All", "All sources, binaries and XFree86 binaries [700M]",
|
||||
NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' },
|
||||
{ "Clear", "Reset all of the above [0M]",
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated to essentially a complete rewrite.
|
||||
*
|
||||
* $Id: network.c,v 1.15 1996/07/08 10:08:16 jkh Exp $
|
||||
* $Id: network.c,v 1.16 1996/08/03 10:11:26 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -106,7 +106,7 @@ mediaInitNetwork(Device *dev)
|
||||
"in the Networking configuration menu before proceeding.", dev->name);
|
||||
return FALSE;
|
||||
}
|
||||
msgNotify("Configuring network device %s.", dev->name);
|
||||
msgNotify("ifconfig %s %s", dev->name, cp);
|
||||
i = vsystem("ifconfig %s %s", dev->name, cp);
|
||||
if (i) {
|
||||
msgConfirm("Unable to configure the %s interface!\n"
|
||||
@ -123,7 +123,8 @@ mediaInitNetwork(Device *dev)
|
||||
msgNotify("Adding default route to %s.", rp);
|
||||
vsystem("route add default %s", rp);
|
||||
}
|
||||
msgDebug("Network initialized successfully.\n");
|
||||
if (isDebug())
|
||||
msgDebug("Network initialized successfully.\n");
|
||||
networkInitialized = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
@ -136,7 +137,8 @@ mediaShutdownNetwork(Device *dev)
|
||||
if (!RunningAsInit || !networkInitialized)
|
||||
return;
|
||||
|
||||
msgDebug("Shutdown called for network device %s\n", dev->name);
|
||||
if (isDebug())
|
||||
msgDebug("Shutdown called for network device %s\n", dev->name);
|
||||
/* Not a serial device? */
|
||||
if (strncmp("sl", dev->name, 2) && strncmp("ppp", dev->name, 3)) {
|
||||
int i;
|
||||
@ -146,7 +148,7 @@ mediaShutdownNetwork(Device *dev)
|
||||
cp = variable_get(ifconfig);
|
||||
if (!cp)
|
||||
return;
|
||||
msgNotify("Shutting interface %s down.", dev->name);
|
||||
msgNotify("ifconfig %s down", dev->name);
|
||||
i = vsystem("ifconfig %s down", dev->name);
|
||||
if (i)
|
||||
msgConfirm("Warning: Unable to down the %s interface properly", dev->name);
|
||||
@ -155,14 +157,13 @@ mediaShutdownNetwork(Device *dev)
|
||||
msgNotify("Deleting default route.");
|
||||
vsystem("route delete default");
|
||||
}
|
||||
networkInitialized = FALSE;
|
||||
}
|
||||
else if (dev->private) { /* ppp sticks its PID there */
|
||||
msgNotify("Killing PPP process %d.", (int)dev->private);
|
||||
msgNotify("Killing previous PPP process %d.", (int)dev->private);
|
||||
kill((pid_t)dev->private, SIGTERM);
|
||||
dev->private = NULL;
|
||||
networkInitialized = FALSE;
|
||||
}
|
||||
networkInitialized = FALSE;
|
||||
}
|
||||
|
||||
/* Start PPP on the 3rd screen */
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: devices.c,v 1.50 1996/11/15 19:53:08 jkh Exp $
|
||||
* $Id: devices.c,v 1.51 1996/11/27 01:01:52 joerg Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -80,7 +80,7 @@ static struct {
|
||||
{ DEVICE_TYPE_NETWORK, "ppp", "Point-to-Point Protocol (PPP) interface" },
|
||||
{ DEVICE_TYPE_NETWORK, "de", "DEC DE435 PCI NIC or other DC21040-AA based card" },
|
||||
{ DEVICE_TYPE_NETWORK, "fxp", "Intel EtherExpress Pro/100B PCI Fast Ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ed", "WD/SMC 80xx; Novell NE1000/2000; 3Com 3C503 cards" },
|
||||
{ DEVICE_TYPE_NETWORK, "ed", "WD/SMC 80xx; Novell NE1000/2000; 3Com 3C503 card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ep", "3Com 3C509 ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "el", "3Com 3C501 ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "fe", "Fujitsu MB86960A/MB86965A ethernet card" },
|
||||
@ -200,7 +200,7 @@ deviceGetAll(void)
|
||||
msgFatal("Unable to open disk %s", names[i]);
|
||||
|
||||
(void)deviceRegister(names[i], names[i], d->name, DEVICE_TYPE_DISK, FALSE, NULL, NULL, NULL, NULL, d);
|
||||
msgDebug("Found a device of type disk named: %s\n", names[i]);
|
||||
msgDebug("Found a disk device named %s\n", names[i]);
|
||||
|
||||
/* Look for existing DOS partitions to register */
|
||||
for (c1 = d->chunks->part; c1; c1 = c1->next) {
|
||||
@ -227,11 +227,11 @@ deviceGetAll(void)
|
||||
s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (s < 0) {
|
||||
msgConfirm("ifconfig: socket");
|
||||
return;
|
||||
goto skipif; /* Jump over network iface probing */
|
||||
}
|
||||
if (ioctl(s, SIOCGIFCONF, (char *) &ifc) < 0) {
|
||||
msgConfirm("ifconfig (SIOCGIFCONF)");
|
||||
return;
|
||||
goto skipif; /* Jump over network iface probing */
|
||||
}
|
||||
ifflags = ifc.ifc_req->ifr_flags;
|
||||
end = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);
|
||||
@ -241,12 +241,13 @@ deviceGetAll(void)
|
||||
/* If it's not a link entry, forget it */
|
||||
if (ifptr->ifr_ifru.ifru_addr.sa_family != AF_LINK)
|
||||
continue;
|
||||
|
||||
/* Eliminate network devices that don't make sense */
|
||||
if (!strncmp(ifptr->ifr_name, "tun", 3)
|
||||
|| !strncmp(ifptr->ifr_name, "lo0", 3))
|
||||
if (!strncmp(ifptr->ifr_name, "tun", 3) || !strncmp(ifptr->ifr_name, "lo0", 3))
|
||||
continue;
|
||||
descr = NULL;
|
||||
for (i = 0; device_names[i].name; i++) {
|
||||
|
||||
/* Try and find its description */
|
||||
for (i = 0, descr = NULL; device_names[i].name; i++) {
|
||||
int len = strlen(device_names[i].name);
|
||||
|
||||
if (!strncmp(ifptr->ifr_name, device_names[i].name, len)) {
|
||||
@ -256,9 +257,10 @@ deviceGetAll(void)
|
||||
}
|
||||
if (!descr)
|
||||
descr = "<unknown network interface type>";
|
||||
|
||||
deviceRegister(ifptr->ifr_name, descr, strdup(ifptr->ifr_name), DEVICE_TYPE_NETWORK, TRUE,
|
||||
mediaInitNetwork, NULL, NULL, mediaShutdownNetwork, NULL);
|
||||
msgDebug("Found a device of type network named: %s\n", ifptr->ifr_name);
|
||||
msgDebug("Found a network device named %s\n", ifptr->ifr_name);
|
||||
close(s);
|
||||
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
|
||||
msgConfirm("ifconfig: socket");
|
||||
@ -268,6 +270,7 @@ deviceGetAll(void)
|
||||
ifptr = (struct ifreq *)((caddr_t)ifptr + ifptr->ifr_addr.sa_len - sizeof(struct sockaddr));
|
||||
}
|
||||
|
||||
skipif:
|
||||
/* Finally, try to find all the types of devices one might need
|
||||
* during the second stage of the installation.
|
||||
*/
|
||||
@ -283,7 +286,7 @@ deviceGetAll(void)
|
||||
(void)deviceRegister(device_names[i].name, device_names[i].description, strdup(try),
|
||||
DEVICE_TYPE_CDROM, TRUE, mediaInitCDROM, mediaGetCDROM, NULL,
|
||||
mediaShutdownCDROM, NULL);
|
||||
msgDebug("Found a device of type CDROM named: %s\n", device_names[i].name);
|
||||
msgDebug("Found a CDROM device named %s\n", device_names[i].name);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -293,7 +296,7 @@ deviceGetAll(void)
|
||||
if (fd) close(fd);
|
||||
deviceRegister(device_names[i].name, device_names[i].description, strdup(try),
|
||||
DEVICE_TYPE_TAPE, TRUE, mediaInitTape, mediaGetTape, NULL, mediaShutdownTape, NULL);
|
||||
msgDebug("Found a device of type TAPE named: %s\n", device_names[i].name);
|
||||
msgDebug("Found a TAPE device named %s\n", device_names[i].name);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -304,7 +307,7 @@ deviceGetAll(void)
|
||||
deviceRegister(device_names[i].name, device_names[i].description, strdup(try),
|
||||
DEVICE_TYPE_FLOPPY, TRUE, mediaInitFloppy, mediaGetFloppy, NULL,
|
||||
mediaShutdownFloppy, NULL);
|
||||
msgDebug("Found a device of type floppy named: %s\n", device_names[i].name);
|
||||
msgDebug("Found a floppy device named %s\n", device_names[i].name);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -327,7 +330,7 @@ deviceGetAll(void)
|
||||
sprintf(newdesc, cp, "PPP interface");
|
||||
deviceRegister("ppp0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork,
|
||||
NULL, NULL, mediaShutdownNetwork, NULL);
|
||||
msgDebug("Found a device of type network named: %s\n", device_names[i].name);
|
||||
msgDebug("Found a serial network device named %s on %s\n", device_names[i].name, try);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: menus.c,v 1.97 1996/11/27 12:44:43 jkh Exp $
|
||||
* $Id: menus.c,v 1.98 1996/11/29 23:52:20 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -641,8 +641,6 @@ DMenu MenuSubDistributions = {
|
||||
NULL,
|
||||
{ { "bin", "Binary base distribution (required) [36M]",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BIN },
|
||||
{ "commerce", "Commercial and shareware demos [10M]",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMMERCIAL },
|
||||
{ "compat1x", "FreeBSD 1.x binary compatibility [2M]",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT1X },
|
||||
{ "compat20", "FreeBSD 2.0 binary compatibility [2M]",
|
||||
@ -667,8 +665,6 @@ DMenu MenuSubDistributions = {
|
||||
srcFlagCheck, distSetSrc },
|
||||
{ "XFree86", "The XFree86 3.2 distribution",
|
||||
x11FlagCheck, distSetXF86 },
|
||||
{ "xperimnt", "Experimental work in progress!",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_EXPERIMENTAL },
|
||||
{ "All", "All sources, binaries and XFree86 binaries [700M]",
|
||||
NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' },
|
||||
{ "Clear", "Reset all of the above [0M]",
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: devices.c,v 1.50 1996/11/15 19:53:08 jkh Exp $
|
||||
* $Id: devices.c,v 1.51 1996/11/27 01:01:52 joerg Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -80,7 +80,7 @@ static struct {
|
||||
{ DEVICE_TYPE_NETWORK, "ppp", "Point-to-Point Protocol (PPP) interface" },
|
||||
{ DEVICE_TYPE_NETWORK, "de", "DEC DE435 PCI NIC or other DC21040-AA based card" },
|
||||
{ DEVICE_TYPE_NETWORK, "fxp", "Intel EtherExpress Pro/100B PCI Fast Ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ed", "WD/SMC 80xx; Novell NE1000/2000; 3Com 3C503 cards" },
|
||||
{ DEVICE_TYPE_NETWORK, "ed", "WD/SMC 80xx; Novell NE1000/2000; 3Com 3C503 card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ep", "3Com 3C509 ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "el", "3Com 3C501 ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "fe", "Fujitsu MB86960A/MB86965A ethernet card" },
|
||||
@ -200,7 +200,7 @@ deviceGetAll(void)
|
||||
msgFatal("Unable to open disk %s", names[i]);
|
||||
|
||||
(void)deviceRegister(names[i], names[i], d->name, DEVICE_TYPE_DISK, FALSE, NULL, NULL, NULL, NULL, d);
|
||||
msgDebug("Found a device of type disk named: %s\n", names[i]);
|
||||
msgDebug("Found a disk device named %s\n", names[i]);
|
||||
|
||||
/* Look for existing DOS partitions to register */
|
||||
for (c1 = d->chunks->part; c1; c1 = c1->next) {
|
||||
@ -227,11 +227,11 @@ deviceGetAll(void)
|
||||
s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (s < 0) {
|
||||
msgConfirm("ifconfig: socket");
|
||||
return;
|
||||
goto skipif; /* Jump over network iface probing */
|
||||
}
|
||||
if (ioctl(s, SIOCGIFCONF, (char *) &ifc) < 0) {
|
||||
msgConfirm("ifconfig (SIOCGIFCONF)");
|
||||
return;
|
||||
goto skipif; /* Jump over network iface probing */
|
||||
}
|
||||
ifflags = ifc.ifc_req->ifr_flags;
|
||||
end = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);
|
||||
@ -241,12 +241,13 @@ deviceGetAll(void)
|
||||
/* If it's not a link entry, forget it */
|
||||
if (ifptr->ifr_ifru.ifru_addr.sa_family != AF_LINK)
|
||||
continue;
|
||||
|
||||
/* Eliminate network devices that don't make sense */
|
||||
if (!strncmp(ifptr->ifr_name, "tun", 3)
|
||||
|| !strncmp(ifptr->ifr_name, "lo0", 3))
|
||||
if (!strncmp(ifptr->ifr_name, "tun", 3) || !strncmp(ifptr->ifr_name, "lo0", 3))
|
||||
continue;
|
||||
descr = NULL;
|
||||
for (i = 0; device_names[i].name; i++) {
|
||||
|
||||
/* Try and find its description */
|
||||
for (i = 0, descr = NULL; device_names[i].name; i++) {
|
||||
int len = strlen(device_names[i].name);
|
||||
|
||||
if (!strncmp(ifptr->ifr_name, device_names[i].name, len)) {
|
||||
@ -256,9 +257,10 @@ deviceGetAll(void)
|
||||
}
|
||||
if (!descr)
|
||||
descr = "<unknown network interface type>";
|
||||
|
||||
deviceRegister(ifptr->ifr_name, descr, strdup(ifptr->ifr_name), DEVICE_TYPE_NETWORK, TRUE,
|
||||
mediaInitNetwork, NULL, NULL, mediaShutdownNetwork, NULL);
|
||||
msgDebug("Found a device of type network named: %s\n", ifptr->ifr_name);
|
||||
msgDebug("Found a network device named %s\n", ifptr->ifr_name);
|
||||
close(s);
|
||||
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
|
||||
msgConfirm("ifconfig: socket");
|
||||
@ -268,6 +270,7 @@ deviceGetAll(void)
|
||||
ifptr = (struct ifreq *)((caddr_t)ifptr + ifptr->ifr_addr.sa_len - sizeof(struct sockaddr));
|
||||
}
|
||||
|
||||
skipif:
|
||||
/* Finally, try to find all the types of devices one might need
|
||||
* during the second stage of the installation.
|
||||
*/
|
||||
@ -283,7 +286,7 @@ deviceGetAll(void)
|
||||
(void)deviceRegister(device_names[i].name, device_names[i].description, strdup(try),
|
||||
DEVICE_TYPE_CDROM, TRUE, mediaInitCDROM, mediaGetCDROM, NULL,
|
||||
mediaShutdownCDROM, NULL);
|
||||
msgDebug("Found a device of type CDROM named: %s\n", device_names[i].name);
|
||||
msgDebug("Found a CDROM device named %s\n", device_names[i].name);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -293,7 +296,7 @@ deviceGetAll(void)
|
||||
if (fd) close(fd);
|
||||
deviceRegister(device_names[i].name, device_names[i].description, strdup(try),
|
||||
DEVICE_TYPE_TAPE, TRUE, mediaInitTape, mediaGetTape, NULL, mediaShutdownTape, NULL);
|
||||
msgDebug("Found a device of type TAPE named: %s\n", device_names[i].name);
|
||||
msgDebug("Found a TAPE device named %s\n", device_names[i].name);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -304,7 +307,7 @@ deviceGetAll(void)
|
||||
deviceRegister(device_names[i].name, device_names[i].description, strdup(try),
|
||||
DEVICE_TYPE_FLOPPY, TRUE, mediaInitFloppy, mediaGetFloppy, NULL,
|
||||
mediaShutdownFloppy, NULL);
|
||||
msgDebug("Found a device of type floppy named: %s\n", device_names[i].name);
|
||||
msgDebug("Found a floppy device named %s\n", device_names[i].name);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -327,7 +330,7 @@ deviceGetAll(void)
|
||||
sprintf(newdesc, cp, "PPP interface");
|
||||
deviceRegister("ppp0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork,
|
||||
NULL, NULL, mediaShutdownNetwork, NULL);
|
||||
msgDebug("Found a device of type network named: %s\n", device_names[i].name);
|
||||
msgDebug("Found a serial network device named %s on %s\n", device_names[i].name, try);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: dist.c,v 1.78 1996/11/09 19:26:01 jkh Exp $
|
||||
* $Id: dist.c,v 1.79 1996/11/09 19:47:24 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -73,8 +73,6 @@ static Distribution DistTable[] = {
|
||||
{ "compat1x", "/", &Dists, DIST_COMPAT1X, NULL },
|
||||
{ "compat20", "/", &Dists, DIST_COMPAT20, NULL },
|
||||
{ "compat21", "/", &Dists, DIST_COMPAT21, NULL },
|
||||
{ "commerce", "/usr/local", &Dists, DIST_COMMERCIAL, NULL },
|
||||
{ "xperimnt", "/usr/local", &Dists, DIST_EXPERIMENTAL, NULL },
|
||||
{ "XF8632", "/usr", &Dists, DIST_XF86, XF86DistTable },
|
||||
{ NULL },
|
||||
};
|
||||
|
@ -14,10 +14,8 @@
|
||||
#define DIST_COMPAT20 0x0200
|
||||
#define DIST_COMPAT21 0x0400
|
||||
#define DIST_XF86 0x0800
|
||||
#define DIST_COMMERCIAL 0x1000
|
||||
#define DIST_DES 0x2000
|
||||
#define DIST_EXPERIMENTAL 0x4000
|
||||
#define DIST_ALL 0xFFFF
|
||||
#define DIST_DES 0x1000
|
||||
#define DIST_ALL 0x1FFF
|
||||
|
||||
/* Canned distribution sets */
|
||||
#define _DIST_DEVELOPER \
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: installUpgrade.c,v 1.32 1996/09/18 18:40:37 jkh Exp $
|
||||
* $Id: installUpgrade.c,v 1.33 1996/10/09 09:53:35 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -291,7 +291,7 @@ installUpgrade(dialogMenuItem *self)
|
||||
msgNotify("Preserving /etc directory..");
|
||||
if (vsystem("tar -cf - -C /etc . | tar -xpf - -C %s", saved_etc))
|
||||
if (msgYesNo("Unable to backup your /etc into %s.\n"
|
||||
"Do you want to continue anyway?") != 0)
|
||||
"Do you want to continue anyway?", saved_etc) != 0)
|
||||
return DITEM_FAILURE | DITEM_RECREATE;
|
||||
}
|
||||
if (file_readable("/kernel")) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: menus.c,v 1.97 1996/11/27 12:44:43 jkh Exp $
|
||||
* $Id: menus.c,v 1.98 1996/11/29 23:52:20 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -641,8 +641,6 @@ DMenu MenuSubDistributions = {
|
||||
NULL,
|
||||
{ { "bin", "Binary base distribution (required) [36M]",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BIN },
|
||||
{ "commerce", "Commercial and shareware demos [10M]",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMMERCIAL },
|
||||
{ "compat1x", "FreeBSD 1.x binary compatibility [2M]",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT1X },
|
||||
{ "compat20", "FreeBSD 2.0 binary compatibility [2M]",
|
||||
@ -667,8 +665,6 @@ DMenu MenuSubDistributions = {
|
||||
srcFlagCheck, distSetSrc },
|
||||
{ "XFree86", "The XFree86 3.2 distribution",
|
||||
x11FlagCheck, distSetXF86 },
|
||||
{ "xperimnt", "Experimental work in progress!",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_EXPERIMENTAL },
|
||||
{ "All", "All sources, binaries and XFree86 binaries [700M]",
|
||||
NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' },
|
||||
{ "Clear", "Reset all of the above [0M]",
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated to essentially a complete rewrite.
|
||||
*
|
||||
* $Id: network.c,v 1.15 1996/07/08 10:08:16 jkh Exp $
|
||||
* $Id: network.c,v 1.16 1996/08/03 10:11:26 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -106,7 +106,7 @@ mediaInitNetwork(Device *dev)
|
||||
"in the Networking configuration menu before proceeding.", dev->name);
|
||||
return FALSE;
|
||||
}
|
||||
msgNotify("Configuring network device %s.", dev->name);
|
||||
msgNotify("ifconfig %s %s", dev->name, cp);
|
||||
i = vsystem("ifconfig %s %s", dev->name, cp);
|
||||
if (i) {
|
||||
msgConfirm("Unable to configure the %s interface!\n"
|
||||
@ -123,7 +123,8 @@ mediaInitNetwork(Device *dev)
|
||||
msgNotify("Adding default route to %s.", rp);
|
||||
vsystem("route add default %s", rp);
|
||||
}
|
||||
msgDebug("Network initialized successfully.\n");
|
||||
if (isDebug())
|
||||
msgDebug("Network initialized successfully.\n");
|
||||
networkInitialized = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
@ -136,7 +137,8 @@ mediaShutdownNetwork(Device *dev)
|
||||
if (!RunningAsInit || !networkInitialized)
|
||||
return;
|
||||
|
||||
msgDebug("Shutdown called for network device %s\n", dev->name);
|
||||
if (isDebug())
|
||||
msgDebug("Shutdown called for network device %s\n", dev->name);
|
||||
/* Not a serial device? */
|
||||
if (strncmp("sl", dev->name, 2) && strncmp("ppp", dev->name, 3)) {
|
||||
int i;
|
||||
@ -146,7 +148,7 @@ mediaShutdownNetwork(Device *dev)
|
||||
cp = variable_get(ifconfig);
|
||||
if (!cp)
|
||||
return;
|
||||
msgNotify("Shutting interface %s down.", dev->name);
|
||||
msgNotify("ifconfig %s down", dev->name);
|
||||
i = vsystem("ifconfig %s down", dev->name);
|
||||
if (i)
|
||||
msgConfirm("Warning: Unable to down the %s interface properly", dev->name);
|
||||
@ -155,14 +157,13 @@ mediaShutdownNetwork(Device *dev)
|
||||
msgNotify("Deleting default route.");
|
||||
vsystem("route delete default");
|
||||
}
|
||||
networkInitialized = FALSE;
|
||||
}
|
||||
else if (dev->private) { /* ppp sticks its PID there */
|
||||
msgNotify("Killing PPP process %d.", (int)dev->private);
|
||||
msgNotify("Killing previous PPP process %d.", (int)dev->private);
|
||||
kill((pid_t)dev->private, SIGTERM);
|
||||
dev->private = NULL;
|
||||
networkInitialized = FALSE;
|
||||
}
|
||||
networkInitialized = FALSE;
|
||||
}
|
||||
|
||||
/* Start PPP on the 3rd screen */
|
||||
|
Loading…
Reference in New Issue
Block a user