Przeglądaj źródła

netifd: return error status in reload_service

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 <[email protected]>
Hans Dedecker 8 lat temu
rodzic
commit
4b195a611f

+ 4 - 1
package/network/config/netifd/files/etc/init.d/network

@@ -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() {