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

Commit

Permalink
add exported lpmx_executable env var
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonYangShadow committed Dec 30, 2020
1 parent 45cf1a4 commit 3b2f72c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -2562,6 +2562,10 @@ func (con *Container) genEnv(envmap map[string]string) (map[string]string, *Erro
//set default FAKECHROOT_CMD_SUBSET
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"

//pass current executable to libfakechroot.so so that when external exe are triggered, they might need the current executable location
exe_path, _ := os.Executable()
env["LPMX_EXECUTABLE"] = exe_path

//export env
if data, data_ok := con.SettingConf["export_env"]; data_ok {
if d1, o1 := data.([]interface{}); o1 {
Expand Down

0 comments on commit 3b2f72c

Please sign in to comment.