dropbear: fix procd interface trigger install
authorHans Dedecker <dedeckeh@gmail.com>
Wed, 26 Apr 2017 14:44:02 +0000 (16:44 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 13 Dec 2017 14:20:13 +0000 (15:20 +0100)
Install procd interface triggers only for interfaces which are enabled
so dropbear instances running on (an) enabled interface(s) are not
restarted due to an interface trigger of an interface which is disabled.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit e5bbead1a83944293fccc27679ba9846d133374e)

package/network/services/dropbear/files/dropbear.init

index 5c21359cbf449d777a9219118cf6170374f288d5..2d23ebd04568cff2d98ff9f6cae6c800d50c8152 100755 (executable)
@@ -109,7 +109,9 @@ keygen()
 load_interfaces()
 {
        config_get interface "$1" Interface
-       interfaces=" ${interface} ${interfaces}"
+       config_get enable "$1" enable 1
+
+       [ "${enable}" = "1" ] && interfaces=" ${interface} ${interfaces}"
 }
 
 start_service()