Merge pull request #4463 from antonlacon/le10-backup-restore

system: accept compressed configuration backups
This commit is contained in:
CvH 2020-10-10 07:47:42 +02:00 committed by GitHub
commit ebdbda6024
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -8,7 +8,11 @@
hidecursor
BACKUP_FILE=$(find /storage/.restore/ -name "*.tar" -print -quit 2>/dev/null)
BACKUP_EXTENSION_LIST=".tar .tar.gz .tar.bz2 .tar.xz"
for EXTENSION in $BACKUP_EXTENSION_LIST; do
BACKUP_FILE=$(find /storage/.restore/ -name "*${EXTENSION}" -print -quit 2>/dev/null)
[ -n "${BACKUP_FILE}" ] && break
done
if [ -f "${BACKUP_FILE}" ]; then

View File

@ -2,6 +2,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2020-present Matthias Reichl <hias@horus.com>
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
EARLY_DIR="$2"
@ -27,7 +28,11 @@ for arg in $(cat /proc/cmdline); do
esac
done
BACKUP_FILE=$(ls -1 /storage/.restore/*.tar 2>/dev/null | head -n 1)
BACKUP_EXTENSION_LIST=".tar .tar.gz .tar.bz2 .tar.xz"
for extension in $BACKUP_EXTENSION_LIST; do
BACKUP_FILE=$(ls -1 /storage/.restore/*${EXTENSION} 2>/dev/null | head -n 1)
[ -n "${BACKUP_FILE}" ] && break
done
if [ -f /storage/.please_resize_me ]; then
TARGET="fs-resize.target"