dropbear: use network_get_device instead of scan_interfaces to get the device name
authorFelix Fietkau <nbd@openwrt.org>
Sat, 22 Dec 2012 18:55:57 +0000 (18:55 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 22 Dec 2012 18:55:57 +0000 (18:55 +0000)
SVN-Revision: 34863

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

index c909d2896543bd745ac929209e2111157a5e67e9..6fc79017d9761c6d5b11ae7fc69523a72b299958 100755 (executable)
@@ -61,7 +61,7 @@ dropbear_start()
        local port
        local interface
        config_get interface "${section}" Interface
-       config_get interface "${interface}" ifname "$interface"
+       [ -n "$interface" ] && network_get_device interface "$interface"
        config_get port "${section}" Port 22
        append_ports "$interface" "$port"
        # C) banner file
@@ -115,8 +115,9 @@ start()
        [ -s /etc/dropbear/dropbear_rsa_host_key -a \
          -s /etc/dropbear/dropbear_dss_host_key ] || keygen
 
-       include /lib/network
-       scan_interfaces
+       . /lib/functions.sh
+       . /lib/functions/network.sh
+
        config_load "${NAME}"
        config_foreach dropbear_start dropbear
 }