netifd: fix an error message during network shutdown
authorSteven Barth <cyrus@openwrt.org>
Thu, 2 Oct 2014 19:37:25 +0000 (19:37 +0000)
committerSteven Barth <cyrus@openwrt.org>
Thu, 2 Oct 2014 19:37:25 +0000 (19:37 +0000)
When 'wifi down' is called by /etc/init.d/network, it is run from
stop_service( ). This function is in turn invoked from stop( ).
stop( ) messes up the order by first procd_kill-ing the network
settings, then calling wifi to down the wifi networking
interfaces. By redefining stop( ) instead, the proper order is
restored.

Signed-off-by: Michel Stam <m.stam@fugro.nl>
SVN-Revision: 42745

package/network/config/netifd/files/etc/init.d/network

index 1d8a5b34efe132445a32f1fa7676955890b76025..fbba9ecb1ccc8673bc0d88be385dbba022126c6b 100755 (executable)
@@ -32,8 +32,9 @@ reload_service() {
        /sbin/wifi reload_legacy
 }
 
-stop_service() {
+stop() {
        /sbin/wifi down
+       procd_kill network ''
 }
 
 service_running() {