summaryrefslogtreecommitdiffstats
path: root/ansible/roles/gsm-tester/files/70-net-setup-link-modems.rules
blob: a9826e2ab3d7d449c799d928e8964d184f71160d (plain)
1
2
3
4
5
6
7
8
9
10
SUBSYSTEM!="net", GOTO="net_setup_link_end"
ACTION!="add", GOTO="net_setup_link_end"

IMPORT{builtin}="net_id"

# If dev paths are too long (too many usb hubs in the path) (>IFNAMSIZ), ID_NET_NAME_PATH is not populated.
ENV{DEVTYPE}=="wwan", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}"
ENV{DEVTYPE}=="wwan", ENV{ID_NET_NAME_PATH}=="", PROGRAM="/bin/sh -ec 'echo ${DEVPATH} | sha1sum | head -c14'", NAME="r$result"

LABEL="net_setup_link_end"