[PATCH] startup: export PATH variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The PATH environment variable is set at the shell prompt, but it is not
exported, so currently scripts can't execute other scripts in PATH
anymore. PATH used to be exported in the init script, but this part was
lost when converting the init script to C. Add it back.

Fixes: 90df2a955e ("defaultenv: Convert init script to C")
Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 common/startup.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/startup.c b/common/startup.c
index 767d178de8..1ac36d950c 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -307,6 +307,7 @@ static int run_init(void)
 	struct stat s;
 
 	setenv("PATH", "/env/bin");
+	export("PATH");
 
 	/* Run legacy /env/bin/init if it exists */
 	env_bin_init_exists = stat(INITFILE, &s) == 0;
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux