mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-08-19 11:56:28 +00:00
kvm tools: add HOME env var to hostfs
Add a HOME env var when booting a hostfs guest. This will point out to a home dir within the given guest name. This will make several apps happier when being run under hostfs. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
@@ -116,6 +116,7 @@ static const char *guestfs_dirs[] = {
|
||||
"/var",
|
||||
"/var/lib",
|
||||
"/virt",
|
||||
"/virt/home",
|
||||
};
|
||||
|
||||
static const char *guestfs_symlinks[] = {
|
||||
|
||||
+3
-2
@@ -12,7 +12,8 @@
|
||||
static int run_process(char *filename)
|
||||
{
|
||||
char *new_argv[] = { filename, NULL };
|
||||
char *new_env[] = { "TERM=linux", "DISPLAY=192.168.33.1:0", NULL };
|
||||
char *new_env[] = { "TERM=linux", "DISPLAY=192.168.33.1:0",
|
||||
"HOME=/virt/home", NULL };
|
||||
|
||||
return execve(filename, new_argv, new_env);
|
||||
}
|
||||
@@ -20,7 +21,7 @@ static int run_process(char *filename)
|
||||
static int run_process_sandbox(char *filename)
|
||||
{
|
||||
char *new_argv[] = { filename, "/virt/sandbox.sh", NULL };
|
||||
char *new_env[] = { "TERM=linux", NULL };
|
||||
char *new_env[] = { "TERM=linux", "HOME=/virt/home", NULL };
|
||||
|
||||
return execve(filename, new_argv, new_env);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user