Rename OSC devices and refactor LED setup

- on ROADM Line Degree modules, use "osc" for "eth2",
- on inline amplifiers, use "oscW" for eth2 and "oscE" for the PCIe
add-on NICs,
- otherwise, keep the name as-is (eth2)

And because I'm touching the service which sets up the LEDs, let's
convert it into a shellscript, these one-liners are starting getting
rather scary. This means that:

- I'm splitting these per-function, so SFP netlink activity is separate
from EDFA indication setup,
- correct LEDs are now used for the inline amplifier

Change-Id: Ie0a4a91a3f7e714e4a0d55124e2f5011e7cbdc6b
Task: https://tree.taiga.io/project/jktjkt-czechlight/task/793
diff --git a/package/czechlight-clearfog-leds/init-leds-sfp.sh b/package/czechlight-clearfog-leds/init-leds-sfp.sh
new file mode 100755
index 0000000..fb904c1
--- /dev/null
+++ b/package/czechlight-clearfog-leds/init-leds-sfp.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -ex
+
+for candidate in osc oscW eth2; do
+    if [[ -d "/sys/class/net/${candidate}" ]]; then
+        NETDEV="${candidate}"
+        break
+    fi
+done
+
+if [[ ! -n "${NETDEV+set}" ]]; then
+    echo "Unrecognized SFP device name"
+    exit 1
+fi
+
+# SFP: green lit for "link"
+# SFP: green blinking for activity
+cd /sys/class/leds/sfp:green
+echo netdev > trigger
+echo "${NETDEV}" > device_name
+echo 1 > link
+echo 1 > rx
+echo 1 > tx