mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
LXC: add HOME environment variable
We lacked of HOME environment variable, set 'HOME=/' as default. The kernel sets up $HOME for the init process. Therefore any init can assume that $HOME is set. libvirt currently violates that implicit rule. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
2311e5c4ea
commit
3020594ac5
@ -236,6 +236,7 @@ static virCommandPtr lxcContainerBuildInitCmd(virDomainDefPtr vmDef,
|
|||||||
virCommandAddEnvString(cmd, "PATH=/bin:/sbin");
|
virCommandAddEnvString(cmd, "PATH=/bin:/sbin");
|
||||||
virCommandAddEnvString(cmd, "TERM=linux");
|
virCommandAddEnvString(cmd, "TERM=linux");
|
||||||
virCommandAddEnvString(cmd, "container=lxc-libvirt");
|
virCommandAddEnvString(cmd, "container=lxc-libvirt");
|
||||||
|
virCommandAddEnvString(cmd, "HOME=/");
|
||||||
virCommandAddEnvPair(cmd, "container_uuid", uuidstr);
|
virCommandAddEnvPair(cmd, "container_uuid", uuidstr);
|
||||||
if (nttyPaths > 1)
|
if (nttyPaths > 1)
|
||||||
virCommandAddEnvPair(cmd, "container_ttys", virBufferCurrentContent(&buf));
|
virCommandAddEnvPair(cmd, "container_ttys", virBufferCurrentContent(&buf));
|
||||||
|
Loading…
Reference in New Issue
Block a user