summaryrefslogtreecommitdiffstats
path: root/discover/platform-powerpc.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-08-22 11:41:09 +1000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-08-22 15:17:42 +1000
commit3132110c344c60bbe648b5e1b0473bdec101d111 (patch)
tree52870fbeb249cebde279cecc4143761ed2b12573 /discover/platform-powerpc.c
parentefcff0996d8c9a42e3bbef4a805ff65974684ff0 (diff)
downloadtalos-petitboot-3132110c344c60bbe648b5e1b0473bdec101d111.tar.gz
talos-petitboot-3132110c344c60bbe648b5e1b0473bdec101d111.zip
discover: Update env vars at init and suppress LVM warnings
Environment variables are not platform-specific so move set_proxy_variables to device-handler and call it at handler init. At the same time set LVM_SUPPRESS_FD_WARNINGS to ignore the "file descriptor leaked" warnings when calling LVM-utilities, since we must keep some file descriptors open in lib/process. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/platform-powerpc.c')
-rw-r--r--discover/platform-powerpc.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c
index a4b955e..02d9a20 100644
--- a/discover/platform-powerpc.c
+++ b/discover/platform-powerpc.c
@@ -492,19 +492,6 @@ static void populate_bootdev_config(struct platform_powerpc *platform,
config->n_autoboot_opts = n_new;
}
-static void set_proxy_variables(struct config *config)
-{
- if (config->http_proxy)
- setenv("http_proxy", config->http_proxy, 1);
- else
- unsetenv("http_proxy");
-
- if (config->https_proxy)
- setenv("https_proxy", config->https_proxy, 1);
- else
- unsetenv("https_proxy");
-}
-
static void populate_config(struct platform_powerpc *platform,
struct config *config)
{
@@ -560,7 +547,6 @@ static void populate_config(struct platform_powerpc *platform,
val = get_param(platform, "petitboot,https_proxy");
if (val)
config->https_proxy = talloc_strdup(config, val);
- set_proxy_variables(config);
}
static char *iface_config_str(void *ctx, struct interface_config *config)
@@ -740,7 +726,6 @@ static int update_config(struct platform_powerpc *platform,
update_string_config(platform, "petitboot,http_proxy", val);
val = config->https_proxy ?: "";
update_string_config(platform, "petitboot,https_proxy", val);
- set_proxy_variables(config);
update_network_config(platform, config);
OpenPOWER on IntegriCloud