mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 15:37:49 +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
@ -29,3 +29,5 @@ mkdir -p $INSTALL/usr/lib/openelec
|
|||||||
cp $PKG_DIR/scripts/* $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
|
# This file is part of OpenELEC - http://www.openelec.tv
|
||||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@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.
|
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||||
# http://www.gnu.org/copyleft/gpl.html
|
# http://www.gnu.org/copyleft/gpl.html
|
||||||
################################################################################
|
################################################################################
|
||||||
# reset openelec
|
|
||||||
#
|
|
||||||
# runlevels: openelec, textmode
|
|
||||||
|
|
||||||
get_target() {
|
get_target() {
|
||||||
for arg in $(cat /proc/cmdline); do
|
for arg in $(cat /proc/cmdline); do
|
||||||
@ -45,10 +43,11 @@ get_target() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# hard reset
|
# hard reset
|
||||||
if [ -f $CONFIG_CACHE/reset_oe ] ; then
|
if [ -f /storage/.cache/reset_oe ] ; then
|
||||||
get_target
|
get_target
|
||||||
if [ ! -z $target ] ; then
|
if [ ! -z $target ] ; then
|
||||||
echo "hard resetting..."
|
echo "hard resetting..."
|
||||||
|
lsof | grep /storage
|
||||||
umount /storage
|
umount /storage
|
||||||
mke2fs -t ext4 -m 0 $target 2>&1 >/dev/null
|
mke2fs -t ext4 -m 0 $target 2>&1 >/dev/null
|
||||||
if [ ! -z $label ] ; then
|
if [ ! -z $label ] ; then
|
||||||
@ -62,7 +61,7 @@ if [ -f $CONFIG_CACHE/reset_oe ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# soft reset
|
# soft reset
|
||||||
if [ -f $CONFIG_CACHE/reset_xbmc ] ; then
|
if [ -f /storage/.cache/reset_xbmc ] ; then
|
||||||
get_target
|
get_target
|
||||||
if [ ! -z $target ] ; then
|
if [ ! -z $target ] ; then
|
||||||
echo "soft resetting..."
|
echo "soft resetting..."
|
Loading…
x
Reference in New Issue
Block a user