Skip to content
Snippets Groups Projects
Commit 13ab314b authored by Nickolay Ledovskikh's avatar Nickolay Ledovskikh Committed by John Crispin
Browse files

comgt: add support of using device symlinks.


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: default avatarNickolay Ledovskikh <nledovskikh@gmail.com>
parent cf62a177
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,8 @@ proto_3g_setup() { ...@@ -31,6 +31,8 @@ proto_3g_setup() {
json_get_var dialnumber dialnumber json_get_var dialnumber dialnumber
[ -n "$dat_device" ] && device=$dat_device [ -n "$dat_device" ] && device=$dat_device
device="$(readlink -f $device)"
[ -e "$device" ] || { [ -e "$device" ] || {
proto_set_available "$interface" 0 proto_set_available "$interface" 0
return 1 return 1
......
...@@ -27,6 +27,7 @@ proto_directip_setup() { ...@@ -27,6 +27,7 @@ proto_directip_setup() {
[ -n "$ctl_device" ] && device=$ctl_device [ -n "$ctl_device" ] && device=$ctl_device
device="$(readlink -f $device)"
[ -e "$device" ] || { [ -e "$device" ] || {
proto_notify_error "$interface" NO_DEVICE proto_notify_error "$interface" NO_DEVICE
proto_set_available "$interface" 0 proto_set_available "$interface" 0
......
...@@ -45,6 +45,8 @@ proto_ncm_setup() { ...@@ -45,6 +45,8 @@ proto_ncm_setup() {
proto_set_available "$interface" 0 proto_set_available "$interface" 0
return 1 return 1
} }
device="$(readlink -f $device)"
[ -e "$device" ] || { [ -e "$device" ] || {
echo "Control device not valid" echo "Control device not valid"
proto_set_available "$interface" 0 proto_set_available "$interface" 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment