netifd: return error status in reload_service
authorHans Dedecker <dedeckeh@gmail.com>
Fri, 21 Apr 2017 09:44:57 +0000 (11:44 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 24 Apr 2017 16:51:10 +0000 (18:51 +0200)
Based on a patch by Alexandru Ardelean.
netifd ubus reload call returns the actual reload error status;
return error status as well in reload_service

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
package/network/config/netifd/files/etc/init.d/network

index a825dfd..6cd167d 100755 (executable)
@@ -26,9 +26,12 @@ start_service() {
 }
 
 reload_service() {
+       local rv=0
+
        init_switch
-       ubus call network reload
+       ubus call network reload || rv=1
        /sbin/wifi reload_legacy
+       return $rv
 }
 
 stop_service() {