mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-01 23:17:50 +00:00
service.openelec.settings: port reset scripts to systemd
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
6e8bfe4415
commit
bdf9177335
@ -28,4 +28,6 @@ mkdir -p $INSTALL/usr/share/xbmc/addons/service.openelec.settings
|
||||
mkdir -p $INSTALL/usr/lib/openelec
|
||||
cp $PKG_DIR/scripts/* $INSTALL/usr/lib/openelec
|
||||
|
||||
enable_service backup-restore.service
|
||||
enable_service backup-restore.service
|
||||
enable_service factory-reset.service
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
@ -17,9 +18,6 @@
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
# reset openelec
|
||||
#
|
||||
# runlevels: openelec, textmode
|
||||
|
||||
get_target() {
|
||||
for arg in $(cat /proc/cmdline); do
|
||||
@ -45,10 +43,11 @@ get_target() {
|
||||
}
|
||||
|
||||
# hard reset
|
||||
if [ -f $CONFIG_CACHE/reset_oe ] ; then
|
||||
if [ -f /storage/.cache/reset_oe ] ; then
|
||||
get_target
|
||||
if [ ! -z $target ] ; then
|
||||
echo "hard resetting..."
|
||||
lsof | grep /storage
|
||||
umount /storage
|
||||
mke2fs -t ext4 -m 0 $target 2>&1 >/dev/null
|
||||
if [ ! -z $label ] ; then
|
||||
@ -62,7 +61,7 @@ if [ -f $CONFIG_CACHE/reset_oe ] ; then
|
||||
fi
|
||||
|
||||
# soft reset
|
||||
if [ -f $CONFIG_CACHE/reset_xbmc ] ; then
|
||||
if [ -f /storage/.cache/reset_xbmc ] ; then
|
||||
get_target
|
||||
if [ ! -z $target ] ; then
|
||||
echo "soft resetting..."
|
Loading…
x
Reference in New Issue
Block a user