summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-01-14 10:26:24 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-01-14 10:30:18 +0100
commita8f98aad373aef878cdaa765e8cfd57b891d3406 (patch)
tree3b296cbfcf4eee225a22a009e57e213ba6506fad
parent7d8013fd40ba5c6aea8613856042ab704be31922 (diff)
downloadbarebox-a8f98aad373aef878cdaa765e8cfd57b891d3406.tar.gz
barebox-a8f98aad373aef878cdaa765e8cfd57b891d3406.tar.xz
startup: export PATH variable
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@pengutronix.de>
-rw-r--r--common/startup.c1
1 files changed, 1 insertions, 0 deletions
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;