1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-23 07:31:31 +00:00

Allow a comma-separated list of network interfaces to be specified via the

netDev option in install.cfg.

Submitted by:	randi
MFC after:	1 week
This commit is contained in:
Colin Percival 2009-05-15 00:18:31 +00:00
parent 718d3b2852
commit 6262c79b70
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=192130

View File

@ -642,11 +642,26 @@ tcpDeviceSelect(void)
{
DMenu *menu;
Device **devs, *rval;
char *dev, *network_dev;
int cnt;
rval = NULL;
if (variable_get(VAR_NONINTERACTIVE) && variable_get(VAR_NETWORK_DEVICE)) {
network_dev = variable_get(VAR_NETWORK_DEVICE);
while ((dev = strsep(&network_dev, ",")) != NULL) {
devs = deviceFind(dev, DEVICE_TYPE_NETWORK);
cnt = deviceCount(devs);
if (cnt) {
if (DITEM_STATUS(tcpOpenDialog(devs[0]) == DITEM_SUCCESS))
return(devs[0]);
}
}
}
devs = deviceFind(variable_get(VAR_NETWORK_DEVICE), DEVICE_TYPE_NETWORK);
cnt = deviceCount(devs);
rval = NULL;
if (!cnt) {
msgConfirm("No network devices available!");
@ -660,14 +675,6 @@ tcpDeviceSelect(void)
if (DITEM_STATUS(tcpOpenDialog(devs[0]) == DITEM_SUCCESS))
rval = devs[0];
}
else if (variable_get(VAR_NONINTERACTIVE) && variable_get(VAR_NETWORK_DEVICE)) {
devs = deviceFind(variable_get(VAR_NETWORK_DEVICE), DEVICE_TYPE_NETWORK);
cnt = deviceCount(devs);
if (cnt) {
if (DITEM_STATUS(tcpOpenDialog(devs[0]) == DITEM_SUCCESS))
rval = devs[0];
}
}
else {
int status;