Set critical env PATH + SHELL early

When running Finit under boothcartd (bootchart2 project) the PATH is
lost due to a bug.  This was a wakeup, so set critical variables in
main() early, before calling fs_init().

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2025-12-31 23:29:28 +01:00
1 parent 0dc2513b32
commit 21753e26dd
2 files changed
+21

No files matched your search

+11
View File
@@ -82,6 +82,17 @@ pid_t run_sh (char *tty, int noclear, int nowait, struct rlimit rlimi
pid_t run_bg (char *cmd, char *args[]);
int run_parts (char *dir, char *cmd, const char *env[], int progress, int sysv);
static inline int checkenv(const char *env)
{
const char *val = getenv(env);
if (!val || !val[0])
return 0;
return 1;
}
static inline int dprint(int fd, const char *s, size_t len)
{
size_t loop = 3;