[LEDE-DEV] [PATCH 3/3][RFC] netifd: don't restart on reload error

Alexandru Ardelean ardeleanalex at gmail.com
Mon Mar 20 07:08:55 PDT 2017


From: Alexandru Ardelean <ardeleanalex at gmail.com>

We just want netifd to return a non-zero err-code.
Reload has failed, a restart will not make it better necessarily.

Signed-off-by: Alexandru Ardelean <ardeleanalex at gmail.com>
---
 package/network/config/netifd/files/etc/init.d/network | 3 ++-
 1 file changed, 2 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 a825dfd..1229ba2 100755
--- a/package/network/config/netifd/files/etc/init.d/network
+++ b/package/network/config/netifd/files/etc/init.d/network
@@ -4,6 +4,7 @@ START=20
 STOP=90
 
 USE_PROCD=1
+RESTART_ON_RELOAD_ERR=0
 
 init_switch() {
 	setup_switch() { return 0; }
@@ -27,7 +28,7 @@ start_service() {
 
 reload_service() {
 	init_switch
-	ubus call network reload
+	ubus call network reload || return 1
 	/sbin/wifi reload_legacy
 }
 
-- 
2.7.4




More information about the Lede-dev mailing list