forked from Ivasoft/openwrt
make basefiles aware of procd
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36003
This commit is contained in:
18
package/base-files/files/etc/rc.button/reset
Executable file
18
package/base-files/files/etc/rc.button/reset
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "${ACTION}" = "released" ] || exit 0
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
logger "$BUTTON pressed for $SEEN seconds"
|
||||
|
||||
if [ "$SEEN" -lt 1 ]
|
||||
then
|
||||
echo "REBOOT" > /dev/console
|
||||
sync
|
||||
reboot
|
||||
elif [ "$SEEN" -gt 5 ]
|
||||
then
|
||||
echo "FACTORY RESET" > /dev/console
|
||||
firstboot && reboot &
|
||||
fi
|
||||
Reference in New Issue
Block a user