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 5821c58f20aa8b3822cbd89809069c476612be39..434351602ff8a292251d973e90ee06e44117ba1b 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 274645b91744818bb23dbb12322000b828e45722..123e11460598d6f3c3d064accb34b23df1375634 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);