If that file exists, read it and pass the content
of the OPTIONS variable to netifd daemon.

For instance, this would be a valid content for this file:
OPTIONS="-r /tmp/resolv.XXX"

Signed-off-by: Jonh Wendell <jonh.wend...@oiwifi.com.br>
---
 package/network/config/netifd/files/etc/init.d/network |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/network/config/netifd/files/etc/init.d/network
b/package/network/config/netifd/files/etc/init.d/network
index 429f33d..cf0737b 100755
--- a/package/network/config/netifd/files/etc/init.d/network
+++ b/package/network/config/netifd/files/etc/init.d/network
@@ -6,13 +6,16 @@ STOP=90
 SERVICE_DAEMONIZE=1
 SERVICE_WRITE_PID=1

+DEFAULT=/etc/default/netifd
+
 start() {
     stop
     [ -e /proc/sys/kernel/core_pattern ] && {
         ulimit -c unlimited
         echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
     }
-    service_start /sbin/netifd
+    [ -f $DEFAULT ] && . $DEFAULT
+    service_start /sbin/netifd $OPTIONS

     setup_switch() { return 0; }

-- 
1.7.10.4


-- 
Jonh Wendell
http://www.bani.com.br
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to