[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#670941: network-console: set LED signal on LaCie Kirkwood NASes when SSH is ready



Package: network-console
Version: 1.30
Severity: wishlist
Tags: d-i patch

Dear Maintainer,

Please consider applying the attached patch.

Regards,

Simon

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: armel (armv5tel)

Kernel: Linux 3.2.0-00010-g0a7ba17 (PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages network-console depends on:
pn  cdebconf-udeb        <none>
pn  configured-network   <none>
pn  openssh-server-udeb  <none>

network-console recommends no packages.

network-console suggests no packages.

-- no debconf information
>From 1c17d91763aa63fa96a85db53ded0f90b9736dbf Mon Sep 17 00:00:00 2001
From: Simon Guinot <simon.guinot@sequanux.org>
Date: Sun, 22 Apr 2012 06:06:41 +0000
Subject: [PATCH] Turn red front LED on LaCie NAS when SSH is ready

---
 debian/network-console.postinst |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/debian/network-console.postinst b/debian/network-console.postinst
index c5c0560..46fcf86 100755
--- a/debian/network-console.postinst
+++ b/debian/network-console.postinst
@@ -101,6 +101,23 @@ case "$ARCHDETECT" in
 		qcommand statusled greenon
 		qcommand buzzer short
 	fi
+	# LaCie Network Space v2 (and parents) and d2 Network v2
+	for led_dev in ns_v2 d2net_v2; do
+		if [ -e /sys/class/leds/$led_dev:blue:sata/brightness ]; then
+			echo 0 > /sys/class/leds/$led_dev:blue:sata/brightness
+		fi
+		if [ -e /sys/class/leds/$led_dev:red:fail/brightness ]; then
+			echo 255 > /sys/class/leds/$led_dev:red:fail/brightness
+		fi
+	done
+	# LaCie 2Big Network v2
+	if [ -e /sys/class/leds/net2big-v2:red:power/brightness ]; then
+		echo 255 > /sys/class/leds/net2big-v2:red:power/brightness
+	fi
+	# LaCie 5Big Network v2
+	if [ -e /sys/class/leds/net5big-v2:red:power/brightness ]; then
+		echo 255 > /sys/class/leds/net5big-v2:red:power/brightness
+	fi
 	;;
     arm*/orion5x)
 	# Buffalo devices
-- 
1.7.9.5


Reply to: