Some cosmetic tweaks, attempt to fix package wait problem by checking

for error return as well (not sure if this is it, but it's one possible
explanation).
This commit is contained in:
Jordan K. Hubbard 1996-10-12 19:30:26 +00:00
parent bc2c47df4b
commit 0383bc6a90
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18890
7 changed files with 39 additions and 25 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: media.c,v 1.59 1996/10/06 02:10:54 jkh Exp $
* $Id: media.c,v 1.60 1996/10/09 09:53:38 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -262,6 +262,10 @@ mediaSetFTP(dialogMenuItem *self)
static Boolean network_init = 1;
int what = DITEM_RESTORE;
/* If we've been through here before ... */
if (!network_init && msgYesNo("Re-use old FTP site selection values?"))
variable_unset(VAR_FTP_PATH);
cp = variable_get(VAR_FTP_PATH);
if (!cp) {
dialog_clear_norefresh();
@ -298,12 +302,12 @@ mediaSetFTP(dialogMenuItem *self)
dialog_clear_norefresh();
if (network_init || msgYesNo("You've already done the network configuration once,\n"
"would you like to skip over it now?") != 0) {
if (mediaDevice)
mediaDevice->shutdown(mediaDevice);
if (!tcpDeviceSelect()) {
variable_unset(VAR_FTP_PATH);
return DITEM_FAILURE | what;
}
if (!network_init)
mediaDevice->shutdown(mediaDevice);
if (!mediaDevice || !mediaDevice->init(mediaDevice)) {
if (isDebug())
msgDebug("mediaSetFTP: Net device init failed.\n");

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: menus.c,v 1.86 1996/10/05 11:56:48 jkh Exp $
* $Id: menus.c,v 1.87 1996/10/10 09:22:37 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -442,6 +442,8 @@ guaranteed to carry the full range of possible distributions.",
VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/" },
{ "URL", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=other" },
{ "Argentina", "ftp.ar.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.ar.freebsd.org/pub/FreeBSD/" },
{ "Australia", "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.au.freebsd.org/pub/FreeBSD/" },
{ "Australia #2", "ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL,
@ -490,10 +492,10 @@ guaranteed to carry the full range of possible distributions.",
VAR_FTP_PATH "=ftp://ftp.hk.super.net/pub/FreeBSD/" },
{ "Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org/pub/FreeBSD/" },
{ "Israel", "orgchem.weizmann.ac.il", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://orgchem.weizmann.ac.il/pub/FreeBSD/" },
{ "Israel #2", "xray4.weizmann.ac.il", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://xray4.weizmann.ac.il/pub/FreeBSD/" },
{ "Israel", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.il.freebsd.org/pub/FreeBSD/" },
{ "Israel #2", "ftp2.il.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp2.il.freebsd.org/pub/FreeBSD/" },
{ "Japan", "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org/pub/FreeBSD/" },
{ "Japan #2", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL,

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: package.c,v 1.46 1996/10/05 12:28:36 jkh Exp $
* $Id: package.c,v 1.47 1996/10/06 03:18:55 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -181,7 +181,7 @@ package_extract(Device *dev, char *name, Boolean depended)
msgNotify("Package %s was added successfully", name);
/* Now catch any stragglers */
while (wait4(-1, &tot, WNOHANG, NULL));
while (wait3(&tot, WNOHANG, NULL) > 0);
sleep(1);
restorescr(w);

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: menus.c,v 1.86 1996/10/05 11:56:48 jkh Exp $
* $Id: menus.c,v 1.87 1996/10/10 09:22:37 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -442,6 +442,8 @@ guaranteed to carry the full range of possible distributions.",
VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/" },
{ "URL", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=other" },
{ "Argentina", "ftp.ar.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.ar.freebsd.org/pub/FreeBSD/" },
{ "Australia", "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.au.freebsd.org/pub/FreeBSD/" },
{ "Australia #2", "ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL,
@ -490,10 +492,10 @@ guaranteed to carry the full range of possible distributions.",
VAR_FTP_PATH "=ftp://ftp.hk.super.net/pub/FreeBSD/" },
{ "Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org/pub/FreeBSD/" },
{ "Israel", "orgchem.weizmann.ac.il", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://orgchem.weizmann.ac.il/pub/FreeBSD/" },
{ "Israel #2", "xray4.weizmann.ac.il", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://xray4.weizmann.ac.il/pub/FreeBSD/" },
{ "Israel", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.il.freebsd.org/pub/FreeBSD/" },
{ "Israel #2", "ftp2.il.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp2.il.freebsd.org/pub/FreeBSD/" },
{ "Japan", "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org/pub/FreeBSD/" },
{ "Japan #2", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL,

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: media.c,v 1.59 1996/10/06 02:10:54 jkh Exp $
* $Id: media.c,v 1.60 1996/10/09 09:53:38 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -262,6 +262,10 @@ mediaSetFTP(dialogMenuItem *self)
static Boolean network_init = 1;
int what = DITEM_RESTORE;
/* If we've been through here before ... */
if (!network_init && msgYesNo("Re-use old FTP site selection values?"))
variable_unset(VAR_FTP_PATH);
cp = variable_get(VAR_FTP_PATH);
if (!cp) {
dialog_clear_norefresh();
@ -298,12 +302,12 @@ mediaSetFTP(dialogMenuItem *self)
dialog_clear_norefresh();
if (network_init || msgYesNo("You've already done the network configuration once,\n"
"would you like to skip over it now?") != 0) {
if (mediaDevice)
mediaDevice->shutdown(mediaDevice);
if (!tcpDeviceSelect()) {
variable_unset(VAR_FTP_PATH);
return DITEM_FAILURE | what;
}
if (!network_init)
mediaDevice->shutdown(mediaDevice);
if (!mediaDevice || !mediaDevice->init(mediaDevice)) {
if (isDebug())
msgDebug("mediaSetFTP: Net device init failed.\n");

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: menus.c,v 1.86 1996/10/05 11:56:48 jkh Exp $
* $Id: menus.c,v 1.87 1996/10/10 09:22:37 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -442,6 +442,8 @@ guaranteed to carry the full range of possible distributions.",
VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/" },
{ "URL", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=other" },
{ "Argentina", "ftp.ar.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.ar.freebsd.org/pub/FreeBSD/" },
{ "Australia", "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.au.freebsd.org/pub/FreeBSD/" },
{ "Australia #2", "ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL,
@ -490,10 +492,10 @@ guaranteed to carry the full range of possible distributions.",
VAR_FTP_PATH "=ftp://ftp.hk.super.net/pub/FreeBSD/" },
{ "Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org/pub/FreeBSD/" },
{ "Israel", "orgchem.weizmann.ac.il", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://orgchem.weizmann.ac.il/pub/FreeBSD/" },
{ "Israel #2", "xray4.weizmann.ac.il", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://xray4.weizmann.ac.il/pub/FreeBSD/" },
{ "Israel", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.il.freebsd.org/pub/FreeBSD/" },
{ "Israel #2", "ftp2.il.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp2.il.freebsd.org/pub/FreeBSD/" },
{ "Japan", "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org/pub/FreeBSD/" },
{ "Japan #2", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL,

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: package.c,v 1.46 1996/10/05 12:28:36 jkh Exp $
* $Id: package.c,v 1.47 1996/10/06 03:18:55 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -181,7 +181,7 @@ package_extract(Device *dev, char *name, Boolean depended)
msgNotify("Package %s was added successfully", name);
/* Now catch any stragglers */
while (wait4(-1, &tot, WNOHANG, NULL));
while (wait3(&tot, WNOHANG, NULL) > 0);
sleep(1);
restorescr(w);