diff --git a/luci-app-store/Makefile b/luci-app-store/Makefile index e8ca464bf..c84b248c9 100644 --- a/luci-app-store/Makefile +++ b/luci-app-store/Makefile @@ -11,13 +11,13 @@ LUCI_DEPENDS:=+curl +opkg +luci-base +tar +libuci-lua +mount-utils +luci-lib-tas LUCI_EXTRA_DEPENDS:=luci-lib-taskd (>=1.0.19) LUCI_PKGARCH:=all -PKG_VERSION:=0.1.29-3 +PKG_VERSION:=0.1.29-4 # PKG_RELEASE MUST be empty for luci.mk PKG_RELEASE:= ISTORE_UI_VERSION:=0.1.28 -ISTORE_UI_RELEASE:=1 -PKG_HASH:=c45d7552a4c52fdd2f5a2a9bbc94d14a66c5af187ef8a117a3e08b6a9a4b7dbf +ISTORE_UI_RELEASE:=2 +PKG_HASH:=c83eb15c65ca0d4368beda8977b29ae6f496afa5c3bd1ad898c9e12abeabdd46 PKG_SOURCE_URL_FILE:=v$(ISTORE_UI_VERSION)-$(ISTORE_UI_RELEASE).tar.gz PKG_SOURCE:=istore-ui-$(PKG_SOURCE_URL_FILE) diff --git a/luci-app-store/root/usr/libexec/istore/overlay-backup b/luci-app-store/root/usr/libexec/istore/overlay-backup index a8b97a9e3..b260231dc 100755 --- a/luci-app-store/root/usr/libexec/istore/overlay-backup +++ b/luci-app-store/root/usr/libexec/istore/overlay-backup @@ -134,19 +134,24 @@ restore() { # prevent uci cache rm -rf /var/run/uci + SANDBOX_UUID= + SANDBOX_LABEL= + SANDBOX_DEVICE= local tar_extra_args=overlay/upper if has_ext_overlay; then tar_extra_args= - local uuid label device line - local uci_section=$(uci -c /overlay/upper/etc/config show fstab | grep '^fstab\.@mount\[[0-9]*\]\.target='"'/overlay'\$" | head -1 | grep -o '^fstab\.@mount\[[0-9]*\]') - while read line; do - export -n "$line" - done < <( - uci -c /overlay/upper/etc/config show "$uci_section" | sed -e '/^fstab\.[^\.]*=/d' -e 's/^fstab\.[^\.]*\.//g' | grep -e '^uuid=' -e '^label=' -e '^device=' | sed "s/'//g" - ) - SANDBOX_UUID=$uuid - SANDBOX_LABEL=$label - SANDBOX_DEVICE=$device + if echo "${BACKUP_PATH_FILE}" | grep -q '\.s\.overlay\.tar\.gz$' ; then + local uuid label device line + local uci_section=$(uci -c /overlay/upper/etc/config show fstab | grep '^fstab\.@mount\[[0-9]*\]\.target='"'/overlay'\$" | head -1 | grep -o '^fstab\.@mount\[[0-9]*\]') + while read line; do + export -n "$line" + done < <( + uci -c /overlay/upper/etc/config show "$uci_section" | sed -e '/^fstab\.[^\.]*=/d' -e 's/^fstab\.[^\.]*\.//g' | grep -e '^uuid=' -e '^label=' -e '^device=' | sed "s/'//g" + ) + SANDBOX_UUID=$uuid + SANDBOX_LABEL=$label + SANDBOX_DEVICE=$device + fi fi sync / @@ -174,12 +179,18 @@ supports_overlay_backup() { return 0 } +filter_backups() { + if has_ext_overlay; then + cat + else + # do not support restoring sandbox backup on non sandbox env + grep -v '\.s\.overlay\.tar\.gz$' + fi +} + get_backup_file_list() { - local backup_file if [ -n "$1" ]; then - for backup_file in `cd $1 && ls backup_overlay_*.overlay.tar.gz`; do - echo "${backup_file}" - done + ( cd "$1" && ls backup_overlay_*.overlay.tar.gz | filter_backups ) else echo "input backup path is null" exit 1