use /lib/netifd as main path when dummy mode is disabled
authorFelix Fietkau <nbd@openwrt.org>
Sun, 9 Oct 2011 21:47:11 +0000 (23:47 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 9 Oct 2011 21:47:11 +0000 (23:47 +0200)
main.c
netifd.h

diff --git a/main.c b/main.c
index 4757b79..02dd1e5 100644 (file)
--- a/main.c
+++ b/main.c
@@ -11,7 +11,7 @@
 #include "interface.h"
 
 unsigned int debug_mask = 0;
 #include "interface.h"
 
 unsigned int debug_mask = 0;
-const char *main_path = ".";
+const char *main_path = DEFAULT_MAIN_PATH;
 static char **global_argv;
 
 static void netifd_do_restart(struct uloop_timeout *timeout)
 static char **global_argv;
 
 static void netifd_do_restart(struct uloop_timeout *timeout)
index 926cab8..c80980f 100644 (file)
--- a/netifd.h
+++ b/netifd.h
 #include "utils.h"
 
 #ifdef DUMMY_MODE
 #include "utils.h"
 
 #ifdef DUMMY_MODE
+#define DEFAULT_MAIN_PATH      "."
 #define DEFAULT_HOTPLUG_PATH   "./scripts/hotplug-cmd"
 #else
 #define DEFAULT_HOTPLUG_PATH   "./scripts/hotplug-cmd"
 #else
+#define DEFAULT_MAIN_PATH      "/lib/netifd"
 #define DEFAULT_HOTPLUG_PATH   "/sbin/hotplug-cmd"
 #endif
 
 #define DEFAULT_HOTPLUG_PATH   "/sbin/hotplug-cmd"
 #endif