From 08cd2c661ea6ce378ce7a6ff37d11220d65e2c5f Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 8 Feb 2016 12:13:49 +0100 Subject: [PATCH] initd: allow overriding early PATH through build time define Signed-off-by: Jo-Philipp Wich --- initd/early.c | 2 +- initd/init.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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); -- 2.25.1