From e685dc989d72f0a1783f7d4ec5d1a2677d76fabf Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 12 Nov 2011 23:39:56 +0000 Subject: lantiq: adds hotplug handler for handling buttons and makes w303v work with it git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28999 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../base-files/etc/hotplug.d/button/10-generic.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 target/linux/lantiq/base-files/etc/hotplug.d/button/10-generic.sh (limited to 'target/linux/lantiq/base-files/etc/hotplug.d') diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/button/10-generic.sh b/target/linux/lantiq/base-files/etc/hotplug.d/button/10-generic.sh new file mode 100644 index 0000000000..b2fdda23f8 --- /dev/null +++ b/target/linux/lantiq/base-files/etc/hotplug.d/button/10-generic.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +[ "${ACTION}" = "released" ] || exit 0 + +. /lib/functions.sh + +case "${BUTTON}" in + BTN_0) + logger "reset pressed" + sync + reboot + ;; + BTN_1) + logger "factory pressed" + jffs2_mark_erase "rootfs_data" + sync + reboot + ;; + *) + logger "unknown button ${BUTTON}" + ;; +esac -- cgit v1.2.3