提交 c396fb36 编写于 作者: R Ryota Ozaki 提交者: Daniel Veillard

LXC complement PATH environment variable

* src/lxc/lxc_driver.c: without PATH, the controller will definitely
  fail to call ip command
上级 2d8d9b10
......@@ -1005,6 +1005,19 @@ static int lxcControllerStart(virConnectPtr conn,
lenv[lenvc++] = envval; \
} while (0)
#define ADD_ENV_COPY(envname) \
do { \
char *val = getenv(envname); \
if (val != NULL) { \
ADD_ENV_PAIR(envname, val); \
} \
} while (0)
/*
* The controller may call ip command, so we have to remain PATH.
*/
ADD_ENV_COPY("PATH");
log_level = virLogGetDefaultPriority();
if (virAsprintf(&tmp, "LIBVIRT_DEBUG=%d", log_level) < 0)
goto no_memory;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册