[source] netifd: return error status in reload_service

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 14 09:43:58 PST 2017


jow pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/a1392e08c56e01f27e1312e59f4d90a50ed7d0bd

commit a1392e08c56e01f27e1312e59f4d90a50ed7d0bd
Author: Hans Dedecker <dedeckeh at gmail.com>
AuthorDate: Fri Apr 21 11:44:57 2017 +0200

    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 <dedeckeh at gmail.com>
    (cherry picked from commit 4b195a611fe146969e813ce77ecf74ce5f9c176b)
---
 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 a825dfd..6cd167d 100755
--- a/package/network/config/netifd/files/etc/init.d/network
+++ b/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() {



More information about the lede-commits mailing list