1 #!/bin/sh 2 # based on wwan usbmisc 3 # install it to /etc/hotplug.d/usbmisc/01_uqmid.sh 4 5 [ "$ACTION" = add ] || [ "$ACTION" = remove ] || exit 0 6 [ "${DEVNAME/[0-9]/}" = cdc-wdm ] || exit 0 7 8 . /lib/functions.sh 9 . /lib/netifd/netifd-proto.sh 10 11 find_uqmid_iface() { 12 local cfg="$1" 13 14 local proto device 15 config_get proto "$cfg" proto 16 config_get device "$cfg" device 17 18 [ "$proto" = uqmid ] || return 0 19 [ "$device" = "/dev/$DEVNAME" ] || return 0 20 if [ "$ACTION" = add ]; then 21 proto_set_available "$cfg" 1 22 fi 23 if [ "$ACTION" = remove ]; then 24 proto_set_available "$cfg" 0 25 fi 26 exit 0 27 } 28 29 config_load network 30 config_foreach find_uqmid_iface interface
This page was automatically generated by LXR 0.3.1. • OpenWrt