netifd: fix stopping netifd + interfaces
authorFelix Fietkau <nbd@nbd.name>
Mon, 20 Feb 2017 09:49:33 +0000 (10:49 +0100)
committerFelix Fietkau <nbd@nbd.name>
Thu, 23 Feb 2017 15:26:23 +0000 (16:26 +0100)
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@nbd.name>
package/network/config/netifd/files/etc/init.d/network

index bdadbbc..a825dfd 100755 (executable)
@@ -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