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/rules/filesystem/fs/sbin/huawei-monitor

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