mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-09-03 12:11:34 +00:00
set early env for exec
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
This commit is contained in:
@@ -563,6 +563,14 @@ static int hyper_do_exec_cmd(struct hyper_exec *exec, struct hyper_pod *pod, int
|
||||
goto exit;
|
||||
}
|
||||
|
||||
// set early env. the container env config can overwrite it
|
||||
setenv("HOME", "/root", 1);
|
||||
setenv("HOSTNAME", pod->hostname, 1);
|
||||
if (exec->tty)
|
||||
setenv("TERM", "xterm", 1);
|
||||
else
|
||||
unsetenv("TERM");
|
||||
|
||||
hyper_exec_process(exec);
|
||||
|
||||
exit:
|
||||
|
||||
Reference in New Issue
Block a user