20 lines
493 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
# Copyright (C) 2023 Siriling <siriling@qq.com>
#导入组件工具
source "/usr/share/modem/modem_util.sh"
#只在添加和移除的时候执行
# [ "$ACTION" != "add" ] && [ "$ACTION" != "remove" ] && exit
#设备号不存在退出去掉多余的tty设备
[ -z "${DEVNUM}" ] && exit
#测试
# test_usb_hotplug
#始终确保存在运行目录
mkdir -m 0755 -p "${MODEM_RUNDIR}"
#设置USB设备
m_check_usb_device "${ACTION}" "${DEVNUM}" "${PRODUCT}" "/sys${DEVPATH}"