uqmi: add support of using device symlinks.
authorNickolay Ledovskikh <nledovskikh@gmail.com>
Fri, 16 Dec 2016 11:14:05 +0000 (14:14 +0300)
committerJohn Crispin <john@phrozen.org>
Tue, 20 Dec 2016 08:35:35 +0000 (09:35 +0100)
It's useful when using multiple usb devices that should be bound to
certain usb ports. Symlinks are created by hotplug handlers.

Signed-off-by: Nickolay Ledovskikh <nledovskikh@gmail.com>
package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh

index 05b92425ad67c85a601896e9dad3f205beb53ab0..cab9cb91211f0f92ab31d292a90d62e163cd2c65 100755 (executable)
@@ -42,6 +42,8 @@ proto_qmi_setup() {
                proto_set_available "$interface" 0
                return 1
        }
+
+       device="$(readlink -f $device)"
        [ -c "$device" ] || {
                echo "The specified control device does not exist"
                proto_notify_error "$interface" NO_DEVICE