Skip to content
This repository was archived by the owner on May 27, 2023. It is now read-only.

Commit 3b2f72c

Browse files
add exported lpmx_executable env var
1 parent 45cf1a4 commit 3b2f72c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

container/container.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2562,6 +2562,10 @@ func (con *Container) genEnv(envmap map[string]string) (map[string]string, *Erro
25622562
//set default FAKECHROOT_CMD_SUBSET
25632563
env["FAKECHROOT_CMD_SUBST"] = "/sbin/ldconfig.real=/bin/true:/sbin/insserv=/bin/true:/sbin/ldconfig=/bin/true:/usr/bin/ischroot=/bin/true:/usr/bin/mkfifo=/bin/true"
25642564

2565+
//pass current executable to libfakechroot.so so that when external exe are triggered, they might need the current executable location
2566+
exe_path, _ := os.Executable()
2567+
env["LPMX_EXECUTABLE"] = exe_path
2568+
25652569
//export env
25662570
if data, data_ok := con.SettingConf["export_env"]; data_ok {
25672571
if d1, o1 := data.([]interface{}); o1 {

0 commit comments

Comments
 (0)