Correct check for ensuring that the network configuration isn't fiddled with

when running multi-user.
This commit is contained in:
Jordan K. Hubbard 1996-10-05 12:16:49 +00:00
parent 2ac528a98f
commit 3a781673de
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18705
2 changed files with 18 additions and 18 deletions

View File

@ -1,5 +1,5 @@
/* /*
* $Id: tcpip.c,v 1.45 1996/08/03 10:11:56 jkh Exp $ * $Id: tcpip.c,v 1.46 1996/09/01 08:17:14 jkh Exp $
* *
* Copyright (c) 1995 * Copyright (c) 1995
* Gary J Palmer. All rights reserved. * Gary J Palmer. All rights reserved.
@ -236,6 +236,11 @@ tcpOpenDialog(Device *devp)
char help[FILENAME_MAX]; char help[FILENAME_MAX];
char title[80]; char title[80];
if (!RunningAsInit) {
if (isDebug())
msgDebug("Running multi-user, assuming that the network is already up\n");
return DITEM_SUCCESS;
}
save = savescr(); save = savescr();
dialog_clear_norefresh(); dialog_clear_norefresh();
/* We need a curses window */ /* We need a curses window */
@ -521,14 +526,9 @@ tcpDeviceSelect(void)
msgConfirm("No network devices available!"); msgConfirm("No network devices available!");
status = FALSE; status = FALSE;
} }
else if (cnt == 1 || (!RunningAsInit && !Fake)) { else if (cnt == 1) {
/* If we're running in user mode, assume network already up */ if (DITEM_STATUS(tcpOpenDialog(devs[0]) == DITEM_FAILURE))
if (!RunningAsInit) { return FALSE;
if (DITEM_STATUS(tcpOpenDialog(devs[0]) == DITEM_FAILURE))
return FALSE;
}
else
msgDebug("Running multi-user, assuming that the network is already up\n");
mediaDevice = devs[0]; mediaDevice = devs[0];
status = TRUE; status = TRUE;
} }

View File

@ -1,5 +1,5 @@
/* /*
* $Id: tcpip.c,v 1.45 1996/08/03 10:11:56 jkh Exp $ * $Id: tcpip.c,v 1.46 1996/09/01 08:17:14 jkh Exp $
* *
* Copyright (c) 1995 * Copyright (c) 1995
* Gary J Palmer. All rights reserved. * Gary J Palmer. All rights reserved.
@ -236,6 +236,11 @@ tcpOpenDialog(Device *devp)
char help[FILENAME_MAX]; char help[FILENAME_MAX];
char title[80]; char title[80];
if (!RunningAsInit) {
if (isDebug())
msgDebug("Running multi-user, assuming that the network is already up\n");
return DITEM_SUCCESS;
}
save = savescr(); save = savescr();
dialog_clear_norefresh(); dialog_clear_norefresh();
/* We need a curses window */ /* We need a curses window */
@ -521,14 +526,9 @@ tcpDeviceSelect(void)
msgConfirm("No network devices available!"); msgConfirm("No network devices available!");
status = FALSE; status = FALSE;
} }
else if (cnt == 1 || (!RunningAsInit && !Fake)) { else if (cnt == 1) {
/* If we're running in user mode, assume network already up */ if (DITEM_STATUS(tcpOpenDialog(devs[0]) == DITEM_FAILURE))
if (!RunningAsInit) { return FALSE;
if (DITEM_STATUS(tcpOpenDialog(devs[0]) == DITEM_FAILURE))
return FALSE;
}
else
msgDebug("Running multi-user, assuming that the network is already up\n");
mediaDevice = devs[0]; mediaDevice = devs[0];
status = TRUE; status = TRUE;
} }