summaryrefslogtreecommitdiff
path: root/recipes-core/multitech/reset-handler
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/multitech/reset-handler')
-rwxr-xr-xrecipes-core/multitech/reset-handler/reset-handler.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/recipes-core/multitech/reset-handler/reset-handler.sh b/recipes-core/multitech/reset-handler/reset-handler.sh
index 7988342..f36136e 100755
--- a/recipes-core/multitech/reset-handler/reset-handler.sh
+++ b/recipes-core/multitech/reset-handler/reset-handler.sh
@@ -20,6 +20,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
+PERSISTENT_DIR="/var/persistent/"
+ERASE_PERSISTENT="${PERSISTENT_DIR}/mts_do_erase_persistent"
+
name="reset-handler"
log="logger -t $name -s"
pid="$$"
@@ -50,6 +53,9 @@ do_restore_defaults() {
$log "Resetting passwords"
source rmpasswd
fi
+ if [[ -d ${PERSISTENT_DIR} ]] ; then
+ touch ${ERASE_PERSISTENT}
+ fi
$log "Rebooting"
sleep 1
reboot