discover/network: In static config mode, only configure defined interfaces
[petitboot] / discover / network.c
index 0490be9074486355ce436c173aeabb181affac64..bc7e186a1921e8531bb2fd37ed026f5e47e5977e 100644 (file)
@@ -219,6 +219,7 @@ static void configure_interface_dhcp(struct interface *interface)
                pb_system_apps.udhcpc,
                "-R",
                "-n",
+               "-O", "pxeconffile",
                "-p", pidfile,
                "-i", interface->name,
                NULL,
@@ -546,8 +547,8 @@ struct network *network_init(struct device_handler *handler,
        network = talloc(handler, struct network);
        list_init(&network->interfaces);
        network->handler = handler;
-       network->manual_config = false;
        network->dry_run = dry_run;
+       network->manual_config = config_get()->network.n_interfaces != 0;
 
        network_init_dns(network);