diff options
Diffstat (limited to 'package/base-files/files/etc/rc.button/.svn/text-base/reset.svn-base')
-rw-r--r-- | package/base-files/files/etc/rc.button/.svn/text-base/reset.svn-base | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/package/base-files/files/etc/rc.button/.svn/text-base/reset.svn-base b/package/base-files/files/etc/rc.button/.svn/text-base/reset.svn-base new file mode 100644 index 0000000..763994d --- /dev/null +++ b/package/base-files/files/etc/rc.button/.svn/text-base/reset.svn-base @@ -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 |