aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/sysinstall/ftp.c6
-rw-r--r--release/sysinstall/system.c13
-rw-r--r--usr.sbin/sade/system.c13
-rw-r--r--usr.sbin/sysinstall/ftp.c6
-rw-r--r--usr.sbin/sysinstall/system.c13
5 files changed, 39 insertions, 12 deletions
diff --git a/release/sysinstall/ftp.c b/release/sysinstall/ftp.c
index a9e906003d57..2810e98cfc8c 100644
--- a/release/sysinstall/ftp.c
+++ b/release/sysinstall/ftp.c
@@ -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 @@ try:
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
diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c
index 86e3a04059b5..579a8566ef04 100644
--- a/release/sysinstall/system.c
+++ b/release/sysinstall/system.c
@@ -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);
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c
index 86e3a04059b5..579a8566ef04 100644
--- a/usr.sbin/sade/system.c
+++ b/usr.sbin/sade/system.c
@@ -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);
diff --git a/usr.sbin/sysinstall/ftp.c b/usr.sbin/sysinstall/ftp.c
index a9e906003d57..2810e98cfc8c 100644
--- a/usr.sbin/sysinstall/ftp.c
+++ b/usr.sbin/sysinstall/ftp.c
@@ -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 @@ try:
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
diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c
index 86e3a04059b5..579a8566ef04 100644
--- a/usr.sbin/sysinstall/system.c
+++ b/usr.sbin/sysinstall/system.c
@@ -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);