OpenWrt – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | #!/bin/sh |
2 | |||
3 | [ "$ACTION" = add -a "$DEVTYPE" = usb_device ] || exit 0 |
||
4 | |||
5 | . /lib/functions.sh |
||
6 | . /lib/netifd/netifd-proto.sh |
||
7 | |||
8 | vid=$(cat /sys$DEVPATH/idVendor) |
||
9 | pid=$(cat /sys$DEVPATH/idProduct) |
||
10 | [ -f "/lib/network/wwan/$vid:$pid" ] || exit 0 |
||
11 | |||
12 | find_wwan_iface() { |
||
13 | local cfg="$1" |
||
14 | local proto |
||
15 | config_get proto "$cfg" proto |
||
16 | [ "$proto" = wwan ] || return 0 |
||
17 | proto_set_available "$cfg" 1 |
||
18 | ifup $cfg |
||
19 | exit 0 |
||
20 | } |
||
21 | |||
22 | config_load network |
||
23 | config_foreach find_wwan_iface interface |