blob: 72f02020ba79a12fd8a299b9831f7a20acd01f26 [file] [log] [blame]
Jan Kundrátfc16f062018-08-09 19:58:55 +02001[Unit]
2Description=Indication of component state via LEDs on Clearfog
3
4[Service]
5Type=oneshot
6# SFP: green lit for "link"
7# SFP: green blinking for activity
8ExecStart=/bin/sh -c 'echo netdev > /sys/class/leds/sfp:green/trigger'
9ExecStart=/bin/sh -c 'echo eth2 > /sys/class/leds/sfp:green/device_name'
10ExecStart=/bin/sh -c 'echo 1 > /sys/class/leds/sfp:green/link'
11ExecStart=/bin/sh -c 'echo 1 > /sys/class/leds/sfp:green/rx'
12ExecStart=/bin/sh -c 'echo 1 > /sys/class/leds/sfp:green/tx'
13# LINE/EXPRESS: green for "we're getting some signal"
14ExecStart=/bin/sh -c 'echo gpio > /sys/class/leds/line:green/trigger'
15ExecStart=/bin/sh -c "sed -En 's/.*gpio-(.*) \\(EDFA1_ST1_IN_LOS_A .*/\\1/p' /sys/kernel/debug/gpio > /sys/class/leds/line:green/gpio"