>From 99e9d4800f128516f4b8c802e953bd82962defb4 Mon Sep 17 00:00:00 2001 From: Matthew Fatheree <matthew.fathe...@belkin.com> Date: Sun, 4 May 2014 20:20:54 +0700 Subject: [PATCH 19/30] mamba mvebu: Reset button activity in normal mode
- Pressed button 1..10s -> reboot the board. - Pressed button over 10s -> factory reset, then reboot the board. Signed-off-by: Matthew Fatheree <matthew.fathe...@belkin.com> --- .../linksys-base-files/files/etc/rc.button/reset | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 package/linksys-base-files/files/etc/rc.button/reset diff --git a/package/linksys-base-files/files/etc/rc.button/reset b/package/linksys-base-files/files/etc/rc.button/reset new file mode 100755 index 0000000..d30aae2 --- /dev/null +++ b/package/linksys-base-files/files/etc/rc.button/reset @@ -0,0 +1,18 @@ +#!/bin/sh + +[ "${ACTION}" = "released" ] || exit 0 + +. /lib/functions.sh + +logger "$BUTTON pressed for $SEEN seconds" + +if [ "$SEEN" -gt 0 ] && [ "$SEEN" -le 10 ] +then + echo "REBOOT" > /dev/console + sync + reboot +elif [ "$SEEN" -gt 0 ] +then + echo "FACTORY RESET" > /dev/console + jffs2reset -y && reboot & +fi -- 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