mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 04:13:39 +00:00
Ask name of "other" ftp site in correct place.
Make TIOCCONS redirection for console messages work properly; we no longer open /dev/console for all I/O - we use the VTYs directly.
This commit is contained in:
parent
c5495a0f2e
commit
a7f54e2e75
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8770
@ -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: media.c,v 1.16 1995/05/24 09:00:40 jkh Exp $
|
||||
* $Id: media.c,v 1.17 1995/05/26 08:41:41 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -258,6 +258,14 @@ mediaSetFTP(char *str)
|
||||
cp = getenv("ftp");
|
||||
if (!cp)
|
||||
return 0;
|
||||
if (!strcmp(cp, "other")) {
|
||||
cp = msgGetInput("ftp://", "Please specify the URL of a FreeBSD distribution on a\nremote ftp site. This site must accept anonymous ftp!\nA URL looks like this: ftp://<hostname>/<path>");
|
||||
if (!cp || strncmp("ftp://", cp, 6))
|
||||
return 0;
|
||||
else
|
||||
variable_set2("ftp", cp);
|
||||
}
|
||||
|
||||
strcpy(ftpDevice.name, cp);
|
||||
ftpDevice.type = DEVICE_TYPE_NETWORK;
|
||||
ftpDevice.init = mediaInitFTP;
|
||||
|
@ -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: media_strategy.c,v 1.26 1995/05/26 11:21:49 jkh Exp $
|
||||
* $Id: media_strategy.c,v 1.27 1995/05/26 19:28:02 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -650,14 +650,6 @@ mediaInitFTP(Device *dev)
|
||||
url = getenv("ftp");
|
||||
if (!url)
|
||||
return FALSE;
|
||||
if (!strcmp(url, "other")) {
|
||||
url = msgGetInput("ftp://", "Please specify the URL of a FreeBSD distribution on a\nremote ftp site. This site must accept anonymous ftp!\nA URL looks like this: ftp://<hostname>/<path>");
|
||||
if (!url || strncmp("ftp://", url, 6))
|
||||
return FALSE;
|
||||
else
|
||||
variable_set2("ftp", url);
|
||||
}
|
||||
|
||||
my_name = getenv(VAR_HOSTNAME);
|
||||
if (strncmp("ftp://", url, 6) != NULL) {
|
||||
msgConfirm("Invalid URL (`%s') passed to FTP routines!\n(must start with `ftp://')", url);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: system.c,v 1.35 1995/05/26 08:41:49 jkh Exp $
|
||||
* $Id: system.c,v 1.36 1995/05/26 19:28:05 jkh Exp $
|
||||
*
|
||||
* Jordan Hubbard
|
||||
*
|
||||
@ -63,7 +63,7 @@ systemInitialize(int argc, char **argv)
|
||||
OnCDROM = TRUE;
|
||||
chroot("/bootcd");
|
||||
} else {
|
||||
close(0); open("/dev/console", O_RDWR);
|
||||
close(0); open("/dev/ttyv0", O_RDWR);
|
||||
close(1); dup(0);
|
||||
close(2); dup(0);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: tcpip.c,v 1.16 1995/05/26 08:58:35 jkh Exp $
|
||||
* $Id: tcpip.c,v 1.17 1995/05/26 19:28:06 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Gary J Palmer. All rights reserved.
|
||||
@ -216,7 +216,6 @@ tcpOpenDialog(Device *devp)
|
||||
/* Initialise vars from previous device values */
|
||||
if (devp->private) {
|
||||
DevInfo *di = (DevInfo *)devp->private;
|
||||
|
||||
|
||||
strcpy(ipaddr, di->ipaddr);
|
||||
strcpy(netmask, di->netmask);
|
||||
@ -384,7 +383,7 @@ tcpOpenDialog(Device *devp)
|
||||
}
|
||||
|
||||
/* BODGE ALERT! */
|
||||
if ((tmp = index(hostname, '.')) != NULL) {
|
||||
if (((tmp = index(hostname, '.')) != NULL) && (strlen(domainname)==0)) {
|
||||
strncpy(domainname, tmp + 1, strlen(tmp + 1));
|
||||
domainname[strlen(tmp+1)] = '\0';
|
||||
RefreshStringObj(layout[1].obj);
|
||||
|
@ -32,8 +32,16 @@ set_termcap(void)
|
||||
OnVTY = OnSerial = FALSE;
|
||||
if (getpid() != 1)
|
||||
DebugFD = open("sysinstall.debug", O_WRONLY|O_CREAT|O_TRUNC, 0644);
|
||||
else
|
||||
else {
|
||||
int i, on;
|
||||
|
||||
DebugFD = open("/dev/ttyv1", O_WRONLY);
|
||||
on = 1;
|
||||
i = ioctl(DebugFD, TIOCCONS, (char *)&on);
|
||||
msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)\n", DebugFD, i, !i ? "success" : strerror(errno));
|
||||
RunningAsInit = TRUE;
|
||||
OnVTY = TRUE;
|
||||
}
|
||||
term = getenv("TERM");
|
||||
stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay);
|
||||
if (stat < 0) {
|
||||
@ -64,13 +72,6 @@ set_termcap(void)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (DebugFD == -1) {
|
||||
int i;
|
||||
|
||||
DebugFD = open("/dev/ttyv1", O_WRONLY);
|
||||
i = ioctl(DebugFD, TIOCCONS, (char *)NULL);
|
||||
msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)", DebugFD, i, !i ? "success" : strerror(errno));
|
||||
}
|
||||
OnVTY = TRUE;
|
||||
}
|
||||
return 0;
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: system.c,v 1.35 1995/05/26 08:41:49 jkh Exp $
|
||||
* $Id: system.c,v 1.36 1995/05/26 19:28:05 jkh Exp $
|
||||
*
|
||||
* Jordan Hubbard
|
||||
*
|
||||
@ -63,7 +63,7 @@ systemInitialize(int argc, char **argv)
|
||||
OnCDROM = TRUE;
|
||||
chroot("/bootcd");
|
||||
} else {
|
||||
close(0); open("/dev/console", O_RDWR);
|
||||
close(0); open("/dev/ttyv0", O_RDWR);
|
||||
close(1); dup(0);
|
||||
close(2); dup(0);
|
||||
}
|
||||
|
@ -32,8 +32,16 @@ set_termcap(void)
|
||||
OnVTY = OnSerial = FALSE;
|
||||
if (getpid() != 1)
|
||||
DebugFD = open("sysinstall.debug", O_WRONLY|O_CREAT|O_TRUNC, 0644);
|
||||
else
|
||||
else {
|
||||
int i, on;
|
||||
|
||||
DebugFD = open("/dev/ttyv1", O_WRONLY);
|
||||
on = 1;
|
||||
i = ioctl(DebugFD, TIOCCONS, (char *)&on);
|
||||
msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)\n", DebugFD, i, !i ? "success" : strerror(errno));
|
||||
RunningAsInit = TRUE;
|
||||
OnVTY = TRUE;
|
||||
}
|
||||
term = getenv("TERM");
|
||||
stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay);
|
||||
if (stat < 0) {
|
||||
@ -64,13 +72,6 @@ set_termcap(void)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (DebugFD == -1) {
|
||||
int i;
|
||||
|
||||
DebugFD = open("/dev/ttyv1", O_WRONLY);
|
||||
i = ioctl(DebugFD, TIOCCONS, (char *)NULL);
|
||||
msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)", DebugFD, i, !i ? "success" : strerror(errno));
|
||||
}
|
||||
OnVTY = TRUE;
|
||||
}
|
||||
return 0;
|
||||
|
@ -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: media.c,v 1.16 1995/05/24 09:00:40 jkh Exp $
|
||||
* $Id: media.c,v 1.17 1995/05/26 08:41:41 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -258,6 +258,14 @@ mediaSetFTP(char *str)
|
||||
cp = getenv("ftp");
|
||||
if (!cp)
|
||||
return 0;
|
||||
if (!strcmp(cp, "other")) {
|
||||
cp = msgGetInput("ftp://", "Please specify the URL of a FreeBSD distribution on a\nremote ftp site. This site must accept anonymous ftp!\nA URL looks like this: ftp://<hostname>/<path>");
|
||||
if (!cp || strncmp("ftp://", cp, 6))
|
||||
return 0;
|
||||
else
|
||||
variable_set2("ftp", cp);
|
||||
}
|
||||
|
||||
strcpy(ftpDevice.name, cp);
|
||||
ftpDevice.type = DEVICE_TYPE_NETWORK;
|
||||
ftpDevice.init = mediaInitFTP;
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: system.c,v 1.35 1995/05/26 08:41:49 jkh Exp $
|
||||
* $Id: system.c,v 1.36 1995/05/26 19:28:05 jkh Exp $
|
||||
*
|
||||
* Jordan Hubbard
|
||||
*
|
||||
@ -63,7 +63,7 @@ systemInitialize(int argc, char **argv)
|
||||
OnCDROM = TRUE;
|
||||
chroot("/bootcd");
|
||||
} else {
|
||||
close(0); open("/dev/console", O_RDWR);
|
||||
close(0); open("/dev/ttyv0", O_RDWR);
|
||||
close(1); dup(0);
|
||||
close(2); dup(0);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: tcpip.c,v 1.16 1995/05/26 08:58:35 jkh Exp $
|
||||
* $Id: tcpip.c,v 1.17 1995/05/26 19:28:06 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Gary J Palmer. All rights reserved.
|
||||
@ -216,7 +216,6 @@ tcpOpenDialog(Device *devp)
|
||||
/* Initialise vars from previous device values */
|
||||
if (devp->private) {
|
||||
DevInfo *di = (DevInfo *)devp->private;
|
||||
|
||||
|
||||
strcpy(ipaddr, di->ipaddr);
|
||||
strcpy(netmask, di->netmask);
|
||||
@ -384,7 +383,7 @@ tcpOpenDialog(Device *devp)
|
||||
}
|
||||
|
||||
/* BODGE ALERT! */
|
||||
if ((tmp = index(hostname, '.')) != NULL) {
|
||||
if (((tmp = index(hostname, '.')) != NULL) && (strlen(domainname)==0)) {
|
||||
strncpy(domainname, tmp + 1, strlen(tmp + 1));
|
||||
domainname[strlen(tmp+1)] = '\0';
|
||||
RefreshStringObj(layout[1].obj);
|
||||
|
@ -32,8 +32,16 @@ set_termcap(void)
|
||||
OnVTY = OnSerial = FALSE;
|
||||
if (getpid() != 1)
|
||||
DebugFD = open("sysinstall.debug", O_WRONLY|O_CREAT|O_TRUNC, 0644);
|
||||
else
|
||||
else {
|
||||
int i, on;
|
||||
|
||||
DebugFD = open("/dev/ttyv1", O_WRONLY);
|
||||
on = 1;
|
||||
i = ioctl(DebugFD, TIOCCONS, (char *)&on);
|
||||
msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)\n", DebugFD, i, !i ? "success" : strerror(errno));
|
||||
RunningAsInit = TRUE;
|
||||
OnVTY = TRUE;
|
||||
}
|
||||
term = getenv("TERM");
|
||||
stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay);
|
||||
if (stat < 0) {
|
||||
@ -64,13 +72,6 @@ set_termcap(void)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (DebugFD == -1) {
|
||||
int i;
|
||||
|
||||
DebugFD = open("/dev/ttyv1", O_WRONLY);
|
||||
i = ioctl(DebugFD, TIOCCONS, (char *)NULL);
|
||||
msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)", DebugFD, i, !i ? "success" : strerror(errno));
|
||||
}
|
||||
OnVTY = TRUE;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user