From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] startup: export PATH variable
Date: Thu, 14 Jan 2021 10:30:55 +0100 [thread overview]
Message-ID: <20210114093055.10154-1-s.hauer@pengutronix.de> (raw)
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>
---
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
reply other threads:[~2021-01-14 9:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210114093055.10154-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox