Inline amp: fix duplicate netif names
The first production HW which has arrived uses a different brand of PCIe
NICs with two SFP ports. Our wildcard was too generic and matched both
interfaces, which is not what we want here. Adjust so that only the left
one gets matched.
While we're at this, also assign a different name to the last remaining
interface.
Change-Id: Ic6c20b9ab932221a63d837bc68e6e0ee8479f7ab
diff --git a/board/czechlight/clearfog/overlay/usr/lib/systemd/system-generators/osc b/board/czechlight/clearfog/overlay/usr/lib/systemd/system-generators/osc
index d9a5ffd..ffaa6d1 100755
--- a/board/czechlight/clearfog/overlay/usr/lib/systemd/system-generators/osc
+++ b/board/czechlight/clearfog/overlay/usr/lib/systemd/system-generators/osc
@@ -10,6 +10,7 @@
elif grep -q '\<czechlight=sdn-inline.*\>' /proc/cmdline; then
ETH2_NAME=oscW
ETH3_NAME=oscE
+ ETH4_NAME=sfp3
fi
if [[ -n "${ETH2_NAME+set}" ]] ; then
@@ -24,8 +25,17 @@
if [[ -n "${ETH3_NAME+set}" ]]; then
cat > /run/systemd/network/30-eth3.link <<EOF
[Match]
-Path=platform-soc:pcie-pci-*
+Path=platform-soc:pcie-pci-0000:01:00.0
[Link]
Name=${ETH3_NAME}
EOF
fi
+
+if [[ -n "${ETH4_NAME+set}" ]]; then
+ cat > /run/systemd/network/30-eth4.link <<EOF
+[Match]
+Path=platform-soc:pcie-pci-0000:01:00.1
+[Link]
+Name=${ETH4_NAME}
+EOF
+fi