summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-04-04 15:42:05 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-04-04 15:42:08 +0200
commit8233bf7e9a1903fe6c35c2f45b5f48c223a34ead (patch)
tree097e09138b4161f169d8d09b7f70b0011bb71df0
parent1304063a4a7a6faea85d69be907d3ef9fdf80b89 (diff)
ansible: gsm-tester: Remove net iface name from hash input
Otherwise every time the interface is added (ie when it goes back to default netns), the generate name changes due to DEVPATH containing current name at the end of the path. Change-Id: I87c686caa23a3b39e48e0762d4323a59be7cd4b8
-rw-r--r--ansible/roles/gsm-tester/files/70-net-setup-link-modems.rules2
1 files changed, 1 insertions, 1 deletions
diff --git a/ansible/roles/gsm-tester/files/70-net-setup-link-modems.rules b/ansible/roles/gsm-tester/files/70-net-setup-link-modems.rules
index a9826e2..376b214 100644
--- a/ansible/roles/gsm-tester/files/70-net-setup-link-modems.rules
+++ b/ansible/roles/gsm-tester/files/70-net-setup-link-modems.rules
@@ -5,6 +5,6 @@ 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"
+ENV{DEVTYPE}=="wwan", ENV{ID_NET_NAME_PATH}=="", PROGRAM="/bin/sh -ec 'echo ${DEVPATH} | xargs dirname | sha1sum | head -c14'", NAME="r$result"
LABEL="net_setup_link_end"