summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2009-05-15 00:18:31 +0000
committercperciva <cperciva@FreeBSD.org>2009-05-15 00:18:31 +0000
commit768767541d0c2e71285019bc8fd72c4d77ca9eb6 (patch)
tree2b5e32b5acf36fb4966cbf85cfdfb04c4b119e42
parent9d8f0aff10620f8d6f8d0278f18e5665aa2a8df3 (diff)
downloadFreeBSD-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.c25
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;
OpenPOWER on IntegriCloud