mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update modemmanager
This commit is contained in:
parent
232890376e
commit
3ca89cfd48
5 changed files with 68 additions and 9 deletions
|
@ -39,12 +39,21 @@ mm_find_physdev_sysfs_path() {
|
|||
# avoid infinite loops iterating
|
||||
[ -z "${tmp_path}" ] || [ "${tmp_path}" = "/" ] && return
|
||||
|
||||
# the physical device will be that with a idVendor and idProduct pair of files
|
||||
# for USB devices, the physical device will be that with a idVendor
|
||||
# and idProduct pair of files
|
||||
[ -f "${tmp_path}"/idVendor ] && [ -f "${tmp_path}"/idProduct ] && {
|
||||
tmp_path=$(readlink -f "$tmp_path")
|
||||
echo "${tmp_path}"
|
||||
return
|
||||
}
|
||||
|
||||
# For PCI devices, the physical device will be that with a vendor
|
||||
# and device pair of files
|
||||
[ -f "${tmp_path}"/vendor ] && [ -f "${tmp_path}"/device ] && {
|
||||
tmp_path=$(readlink -f "$tmp_path")
|
||||
echo "${tmp_path}"
|
||||
return
|
||||
}
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue