Cosmetic tweaks, initialize a few variables, fix a reversed conditional.

This commit is contained in:
Jordan K. Hubbard 1996-12-11 19:35:26 +00:00
parent 204c7704d9
commit 0a0e709620
5 changed files with 39 additions and 12 deletions

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: ftp_strat.c,v 1.30 1996/12/09 08:22:13 jkh Exp $
* $Id: ftp.c,v 1.19 1996/12/11 09:34:59 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -88,8 +88,8 @@ mediaInitFTP(Device *dev)
SAFE_STRCPY(password, variable_get(VAR_FTP_PASS));
else
sprintf(password, "installer@%s", variable_get(VAR_HOSTNAME));
msgNotify("Logging in as %s..", login_name);
if ((OpenConn = ftpLogin(hostname, login_name, password, FtpPort, isDebug(), &code)) != 0) {
msgNotify("Logging in to %s@%s..", login_name, hostname);
if ((OpenConn = ftpLogin(hostname, login_name, password, FtpPort, isDebug(), &code)) == NULL) {
if (variable_get(VAR_NO_CONFIRM))
msgNotify("Couldn't open FTP connection to %s, errcode = %d", hostname, code);
else

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: system.c,v 1.66 1996/10/01 12:13:29 jkh Exp $
* $Id: system.c,v 1.67 1996/12/09 06:02:32 jkh Exp $
*
* Jordan Hubbard
*
@ -83,6 +83,13 @@ systemInitialize(int argc, char **argv)
setbuf(stdin, 0);
setbuf(stderr, 0);
}
else {
char hname[256];
/* Initalize various things for a multi-user environment */
if (!gethostname(hname, sizeof hname))
variable_set2(VAR_HOSTNAME, hname);
}
if (set_termcap() == -1) {
printf("Can't find terminal entry\n");
@ -292,12 +299,14 @@ systemCreateHoloshell(void)
struct termios foo;
extern int login_tty(int);
ioctl(0, TIOCNOTTY, NULL);
for (i = getdtablesize(); i; i--)
close(i);
DebugFD = fd = open("/dev/ttyv3", O_RDWR);
fd = open("/dev/ttyv3", O_RDWR);
ioctl(0, TIOCSCTTY, &fd);
dup2(0, 1);
dup2(0, 2);
DebugFD = 2;
if (login_tty(fd) == -1)
msgDebug("Doctor: I can't set the controlling terminal.\n");
signal(SIGTTOU, SIG_IGN);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: system.c,v 1.66 1996/10/01 12:13:29 jkh Exp $
* $Id: system.c,v 1.67 1996/12/09 06:02:32 jkh Exp $
*
* Jordan Hubbard
*
@ -83,6 +83,13 @@ systemInitialize(int argc, char **argv)
setbuf(stdin, 0);
setbuf(stderr, 0);
}
else {
char hname[256];
/* Initalize various things for a multi-user environment */
if (!gethostname(hname, sizeof hname))
variable_set2(VAR_HOSTNAME, hname);
}
if (set_termcap() == -1) {
printf("Can't find terminal entry\n");
@ -292,12 +299,14 @@ systemCreateHoloshell(void)
struct termios foo;
extern int login_tty(int);
ioctl(0, TIOCNOTTY, NULL);
for (i = getdtablesize(); i; i--)
close(i);
DebugFD = fd = open("/dev/ttyv3", O_RDWR);
fd = open("/dev/ttyv3", O_RDWR);
ioctl(0, TIOCSCTTY, &fd);
dup2(0, 1);
dup2(0, 2);
DebugFD = 2;
if (login_tty(fd) == -1)
msgDebug("Doctor: I can't set the controlling terminal.\n");
signal(SIGTTOU, SIG_IGN);

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: ftp_strat.c,v 1.30 1996/12/09 08:22:13 jkh Exp $
* $Id: ftp.c,v 1.19 1996/12/11 09:34:59 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -88,8 +88,8 @@ mediaInitFTP(Device *dev)
SAFE_STRCPY(password, variable_get(VAR_FTP_PASS));
else
sprintf(password, "installer@%s", variable_get(VAR_HOSTNAME));
msgNotify("Logging in as %s..", login_name);
if ((OpenConn = ftpLogin(hostname, login_name, password, FtpPort, isDebug(), &code)) != 0) {
msgNotify("Logging in to %s@%s..", login_name, hostname);
if ((OpenConn = ftpLogin(hostname, login_name, password, FtpPort, isDebug(), &code)) == NULL) {
if (variable_get(VAR_NO_CONFIRM))
msgNotify("Couldn't open FTP connection to %s, errcode = %d", hostname, code);
else

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: system.c,v 1.66 1996/10/01 12:13:29 jkh Exp $
* $Id: system.c,v 1.67 1996/12/09 06:02:32 jkh Exp $
*
* Jordan Hubbard
*
@ -83,6 +83,13 @@ systemInitialize(int argc, char **argv)
setbuf(stdin, 0);
setbuf(stderr, 0);
}
else {
char hname[256];
/* Initalize various things for a multi-user environment */
if (!gethostname(hname, sizeof hname))
variable_set2(VAR_HOSTNAME, hname);
}
if (set_termcap() == -1) {
printf("Can't find terminal entry\n");
@ -292,12 +299,14 @@ systemCreateHoloshell(void)
struct termios foo;
extern int login_tty(int);
ioctl(0, TIOCNOTTY, NULL);
for (i = getdtablesize(); i; i--)
close(i);
DebugFD = fd = open("/dev/ttyv3", O_RDWR);
fd = open("/dev/ttyv3", O_RDWR);
ioctl(0, TIOCSCTTY, &fd);
dup2(0, 1);
dup2(0, 2);
DebugFD = 2;
if (login_tty(fd) == -1)
msgDebug("Doctor: I can't set the controlling terminal.\n");
signal(SIGTTOU, SIG_IGN);