[source] netifd: fix stopping netifd + interfaces

LEDE Commits lede-commits at lists.infradead.org
Thu Feb 23 07:28:27 PST 2017


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/942ac18c8a6d7dbe9ad3b4ac9ef06cbd891ad954

commit 942ac18c8a6d7dbe9ad3b4ac9ef06cbd891ad954
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Feb 20 10:49:33 2017 +0100

    netifd: fix stopping netifd + interfaces
    
    stop() is overwritten by rc.common, so implement stop_service instead.
    While at it, remove the now unnecessary restart() override
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/files/etc/init.d/network | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/package/network/config/netifd/files/etc/init.d/network b/package/network/config/netifd/files/etc/init.d/network
index bdadbbc..a825dfd 100755
--- a/package/network/config/netifd/files/etc/init.d/network
+++ b/package/network/config/netifd/files/etc/init.d/network
@@ -31,9 +31,10 @@ reload_service() {
 	/sbin/wifi reload_legacy
 }
 
-stop() {
+stop_service() {
 	/sbin/wifi down
-	procd_kill network ''
+	ifdown -a
+	sleep 1
 }
 
 service_running() {
@@ -137,14 +138,6 @@ service_triggers()
 	procd_close_validate
 }
 
-restart() {
-	ifdown -a
-	sleep 1
-	trap '' TERM
-	stop "$@"
-	start "$@"
-}
-
 shutdown() {
 	ifdown -a
 	sleep 1



More information about the lede-commits mailing list