aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/imx6/base-files
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2019-09-04 16:57:39 +0200
committerRafał Miłecki <rafal@milecki.pl>2019-09-05 14:33:19 +0200
commitbf390478727ac5f4f9d6fb684de48b8150bcec67 (patch)
treecd19a4cb1b41476edf17cca11807c92541c8eb19 /target/linux/imx6/base-files
parent1078de96e315f3cc2675b2c5935009e8c6159ad4 (diff)
downloadupstream-bf390478727ac5f4f9d6fb684de48b8150bcec67.tar.gz
upstream-bf390478727ac5f4f9d6fb684de48b8150bcec67.tar.bz2
upstream-bf390478727ac5f4f9d6fb684de48b8150bcec67.zip
treewide: don't hardcode "sysupgrade.tgz" file name
1) Add BACKUP_FILE and use it when copying an archive to be restored after sysupgrade (on the next preinit). 2) Use CONF_TAR for copying backup prepared by the /sbin/sysupgrade Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/imx6/base-files')
-rw-r--r--target/linux/imx6/base-files/lib/preinit/79_move_config3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/linux/imx6/base-files/lib/preinit/79_move_config b/target/linux/imx6/base-files/lib/preinit/79_move_config
index 6b66fbd42d..bdf397c4fc 100644
--- a/target/linux/imx6/base-files/lib/preinit/79_move_config
+++ b/target/linux/imx6/base-files/lib/preinit/79_move_config
@@ -2,6 +2,7 @@
. /lib/imx6.sh
. /lib/functions.sh
+. /lib/upgrade/common.sh
move_config() {
local board=$(board_name)
@@ -10,7 +11,7 @@ move_config() {
apalis*)
if [ -b $(bootpart_from_uuid) ]; then
apalis_mount_boot
- [ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
+ [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
umount /boot
fi
;;