From: Jo-Philipp Wich Date: Mon, 8 Feb 2016 11:13:49 +0000 (+0100) Subject: initd: allow overriding early PATH through build time define X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=08cd2c661ea6ce378ce7a6ff37d11220d65e2c5f;p=project%2Fprocd.git initd: allow overriding early PATH through build time define Signed-off-by: Jo-Philipp Wich --- diff --git a/initd/early.c b/initd/early.c index 5821c58..4343516 100644 --- a/initd/early.c +++ b/initd/early.c @@ -90,7 +90,7 @@ early_mounts(void) static void early_env(void) { - setenv("PATH", "/usr/sbin:/usr/bin:/sbin:/bin", 1); + setenv("PATH", EARLY_PATH, 1); } void diff --git a/initd/init.h b/initd/init.h index 274645b..123e114 100644 --- a/initd/init.h +++ b/initd/init.h @@ -18,6 +18,10 @@ #include "../log.h" +#ifndef EARLY_PATH +#define EARLY_PATH "/usr/sbin:/sbin:/usr/bin:/bin" +#endif + void preinit(void); void early(void); int mkdev(const char *progname, int progmode);