summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/sysinstall/network.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/network.c b/usr.sbin/sysinstall/network.c
index a03f69b..20a0430 100644
--- a/usr.sbin/sysinstall/network.c
+++ b/usr.sbin/sysinstall/network.c
@@ -126,8 +126,12 @@ mediaInitNetwork(Device *dev)
snprintf(ifconfig, 255, "%s%s", VAR_IFCONFIG, dev->name);
cp = variable_get(ifconfig);
if (cp) {
- if (strcmp(cp, "DHCP")) {
- msgDebug("ifconfig %s %s\n", dev->name, cp);
+ /*
+ * If this interface isn't a DHCP one, bring it up.
+ * If it is, then it's already up.
+ */
+ if (strstr(cp, "DHCP") == NULL) {
+ msgDebug("Not a DHCP interface.\n");
i = vsystem("ifconfig %s %s", dev->name, cp);
if (i) {
msgConfirm("Unable to configure the %s interface!\n"
@@ -144,6 +148,8 @@ mediaInitNetwork(Device *dev)
msgDebug("Adding default route to %s.\n", rp);
vsystem("route -n add default %s", rp);
}
+ } else {
+ msgDebug("A DHCP interface. Should already be up.\n");
}
} else if ((cp = variable_get(VAR_IPV6ADDR)) == NULL || *cp == '\0') {
msgConfirm("The %s device is not configured. You will need to do so\n"
OpenPOWER on IntegriCloud