initd: allow overriding early PATH through build time define
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 8 Feb 2016 11:13:49 +0000 (12:13 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 8 Feb 2016 11:13:52 +0000 (12:13 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
initd/early.c
initd/init.h

index 5821c58..4343516 100644 (file)
@@ -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
index 274645b..123e114 100644 (file)
 
 #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);