lantiq: adds hotplug handler for handling buttons and makes w303v work with it
[openwrt/svn-archive/archive.git] / target / linux / lantiq / base-files / etc / hotplug.d / button / 10-generic.sh
1 #!/bin/sh
2
3 [ "${ACTION}" = "released" ] || exit 0
4
5 . /lib/functions.sh
6
7 case "${BUTTON}" in
8 BTN_0)
9 logger "reset pressed"
10 sync
11 reboot
12 ;;
13 BTN_1)
14 logger "factory pressed"
15 jffs2_mark_erase "rootfs_data"
16 sync
17 reboot
18 ;;
19 *)
20 logger "unknown button ${BUTTON}"
21 ;;
22 esac