discover: Avoid writing network overrides to NVRAM
[petitboot] / discover / platform-powerpc.c
index 8fca5bd4bdb60da2dce3990696b283ab9d5648f8..2b89121264e4c11e02856c8d7861c1e20dbf53bf 100644 (file)
@@ -635,6 +635,15 @@ static void update_network_config(struct platform_powerpc *platform,
        unsigned int i;
        char *val;
 
+       /*
+        * Don't store IPMI overrides to NVRAM. If this was a persistent
+        * override it was already stored in NVRAM by
+        * get_ipmi_network_override()
+        */
+       if (config->network.n_interfaces &&
+               config->network.interfaces[0]->override)
+               return;
+
        val = talloc_strdup(platform, "");
 
        for (i = 0; i < config->network.n_interfaces; i++) {