]> git.ozlabs.org Git - petitboot/blobdiff - discover/network.c
pb-config: Move config storage modules to "platform" modules in discover code
[petitboot] / discover / network.c
index 7ddecc03b658a59e88e00bfcf9156114ca7f13c6..9da0f7a72526837011c67191152e4653c048e12c 100644 (file)
 #include <types/types.h>
 #include <talloc/talloc.h>
 #include <waiter/waiter.h>
-#include <pb-config/pb-config.h>
 #include <process/process.h>
 #include <system/system.h>
 
 #include "file.h"
 #include "network.h"
 #include "sysinfo.h"
+#include "platform.h"
 #include "device-handler.h"
 
 #define HWADDR_SIZE    6
@@ -220,6 +220,8 @@ static void configure_interface_dhcp(struct interface *interface)
                "-R",
                "-n",
                "-O", "pxeconffile",
+               "-O", "pxepathprefix",
+               "-x", "0x5d:000a",
                "-p", pidfile,
                "-i", interface->name,
                NULL,
@@ -582,8 +584,13 @@ int network_shutdown(struct network *network)
        if (network->waiter)
                waiter_remove(network->waiter);
 
-       list_for_each_entry(&network->interfaces, interface, list)
+       list_for_each_entry(&network->interfaces, interface, list) {
+               if (interface->state == IFSTATE_IGNORED)
+                       continue;
+               if (!strcmp(interface->name, "lo"))
+                       continue;
                interface_down(interface);
+       }
 
        close(network->netlink_sd);
        talloc_free(network);