wwan.usb 399 B

123456789101112131415161718
  1. [ "$ACTION" = add -a "$DEVTYPE" = usb_device ] || exit 0
  2. vid=$(cat /sys$DEVPATH/idVendor)
  3. pid=$(cat /sys$DEVPATH/idProduct)
  4. [ -f "/lib/network/wwan/$vid:$pid" ] || exit 0
  5. find_wwan_iface() {
  6. local cfg="$1"
  7. local proto
  8. config_get proto "$cfg" proto
  9. [ "$proto" = wwan ] || return 0
  10. proto_set_available "$cfg" 1
  11. ifup $cfg
  12. exit 0
  13. }
  14. config_load network
  15. config_foreach find_wwan_iface interface