This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
lsts_glued/packages/filesystem/fs/sbin/huawei-monitor
2013-07-13 17:19:22 +01:00

16 lines
313 B
Bash
Executable File

#! /bin/sh
modem_vid='12d1'
modem_pid='1446'
while [ 1 ]; do
vid=$(grep "$modem_vid" /sys/bus/usb/devices/?-?*/idVendor)
pid=$(grep "$modem_pid" /sys/bus/usb/devices/?-?*/idProduct)
if [ -n "$vid" ] && [ -n "$pid" ]; then
/usr/bin/uswitch "$modem_vid" "$modem_pid"
fi
sleep 5
done