diff options
author | cperciva <cperciva@FreeBSD.org> | 2009-05-15 00:18:31 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2009-05-15 00:18:31 +0000 |
commit | 768767541d0c2e71285019bc8fd72c4d77ca9eb6 (patch) | |
tree | 2b5e32b5acf36fb4966cbf85cfdfb04c4b119e42 | |
parent | 9d8f0aff10620f8d6f8d0278f18e5665aa2a8df3 (diff) | |
download | FreeBSD-src-768767541d0c2e71285019bc8fd72c4d77ca9eb6.zip FreeBSD-src-768767541d0c2e71285019bc8fd72c4d77ca9eb6.tar.gz |
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
-rw-r--r-- | usr.sbin/sysinstall/tcpip.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/usr.sbin/sysinstall/tcpip.c b/usr.sbin/sysinstall/tcpip.c index 18849fc..f505a05 100644 --- a/usr.sbin/sysinstall/tcpip.c +++ b/usr.sbin/sysinstall/tcpip.c @@ -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; |