>From ea96714bb0724cf3e98e86802a3b5b36da67ac89 Mon Sep 17 00:00:00 2001
From: Matthew Fatheree <matthew.fathe...@belkin.com>
Date: Sun, 4 May 2014 20:39:07 +0700
Subject: [PATCH 22/30] mamba mvebu: support blink Power led when enter
 FAILSALE mode

 - Blink 250ms if the Reset button is pressed.
 - Blink 500ms when the board enter to FAILSAFE mode.

Signed-off-by: Matthew Fatheree <matthew.fathe...@belkin.com>
---
 .../files/lib/preinit/99_10_failsafe_login         |   17 +++++++++++++++++
 .../linksys-base-files/files/usr/sbin/check_reset  |    1 +
 2 files changed, 18 insertions(+)
 create mode 100644 
package/linksys-base-files/files/lib/preinit/99_10_failsafe_login

diff --git a/package/linksys-base-files/files/lib/preinit/99_10_failsafe_login 
b/package/linksys-base-files/files/lib/preinit/99_10_failsafe_login
new file mode 100644
index 0000000..d3253c5
--- /dev/null
+++ b/package/linksys-base-files/files/lib/preinit/99_10_failsafe_login
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2010 Vertical Communications
+
+failsafe_netlogin () {
+       /usr/sbin/ledctrl power 255 500 500
+       telnetd -l /bin/login.sh <> /dev/null 2>&1
+}
+
+failsafe_shell() {
+       lock /tmp/.failsafe
+       ash --login
+       echo "Please reboot system when done with failsafe network logins"
+}
+
+boot_hook_add failsafe failsafe_netlogin
+boot_hook_add failsafe failsafe_shell
diff --git a/package/linksys-base-files/files/usr/sbin/check_reset 
b/package/linksys-base-files/files/usr/sbin/check_reset
index a5a0346..dcff612 100755
--- a/package/linksys-base-files/files/usr/sbin/check_reset
+++ b/package/linksys-base-files/files/usr/sbin/check_reset
@@ -8,6 +8,7 @@ value=`cat /sys/class/gpio/gpio33/value`

 if [ $value -le 0 ]
 then
+       /usr/sbin/ledctrl power 255 250 250
        echo "export FAILSAFE=true" > /tmp/enter_failsafe
 else
        echo "export FAILSAFE=" > /tmp/enter_failsafe
--
1.7.9.5



__________________________________________________________________ Confidential 
This e-mail and any files transmitted with it are the property of Belkin 
International, Inc. and/or its affiliates, are confidential, and are intended 
solely for the use of the individual or entity to whom this e-mail is 
addressed. If you are not one of the named recipients or otherwise have reason 
to believe that you have received this e-mail in error, please notify the 
sender and delete this message immediately from your computer. Any other use, 
retention, dissemination, forwarding, printing or copying of this e-mail is 
strictly prohibited. Pour la version française: 
http://www.belkin.com/email-notice/French.html Für die deutsche Übersetzung: 
http://www.belkin.com/email-notice/German.html 
__________________________________________________________________
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to