From ef96b0b1773c4bae58196ba48bec5510bea08751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Sat, 5 Mar 2022 21:38:32 +0100 Subject: [PATCH] gluon-blink: add command to make the current device's status led blink This allows a user to find out which device he's connected to by running gluon-blink The command will trigger a fast-blinnk on the status led --- package/gluon-core/files/usr/bin/gluon-blink | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 package/gluon-core/files/usr/bin/gluon-blink diff --git a/package/gluon-core/files/usr/bin/gluon-blink b/package/gluon-core/files/usr/bin/gluon-blink new file mode 100755 index 00000000..29bd1d6e --- /dev/null +++ b/package/gluon-core/files/usr/bin/gluon-blink @@ -0,0 +1,20 @@ +#!/bin/sh + +# Makes your current device blink + +. /etc/diag.sh + +start() { + set_led_state preinit +} + +stop() { + status_led_off +} + +trap stop EXIT SIGTERM SIGINT +start + +echo "Blinking on $(pretty-hostname) ($(cat /lib/gluon/core/sysconfig/primary_mac)) ... (ctrl-c to stop)" + +sleep infinity