mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 00:41:17 +00:00
70c7a0c33e
For devices such as BTHOMEHUBV5A with both reset and restart buttons, its easily accessible restart button has been assigned to KEY_POWER power script to poweroff preventing accidental (or malicious) factory resets by KEY_RESTART reset script. However an easily accessible button immediately powering off the device is also undesirable. Fixes: FS#1965 Signed-off-by: Alan Swanson <reiver@improbability.net> Signed-off-by: Petr Štetiar <ynezz@true.cz> [long line wrap]
13 lines
134 B
Bash
Executable File
13 lines
134 B
Bash
Executable File
#!/bin/sh
|
|
|
|
[ "${ACTION}" = "released" ] || exit 0
|
|
|
|
if [ "$SEEN" -ge 5 ]
|
|
then
|
|
echo "REBOOT" > /dev/console
|
|
sync
|
|
reboot
|
|
fi
|
|
|
|
return 0
|