diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-09-04 16:57:39 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2019-09-12 13:25:27 +0200 |
commit | 37caec2d5e01b907a86969aa1526a6ec3812b511 (patch) | |
tree | d93932477cb100306812e6fcad374e0c3f16e440 /target/linux/apm821xx/base-files | |
parent | f54bc3985a2fbc30256d9aee8ea3b60b8aee593a (diff) | |
download | upstream-37caec2d5e01b907a86969aa1526a6ec3812b511.tar.gz upstream-37caec2d5e01b907a86969aa1526a6ec3812b511.tar.bz2 upstream-37caec2d5e01b907a86969aa1526a6ec3812b511.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>
(cherry picked from commit bf390478727ac5f4f9d6fb684de48b8150bcec67)
Diffstat (limited to 'target/linux/apm821xx/base-files')
-rw-r--r-- | target/linux/apm821xx/base-files/lib/preinit/79_move_config | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/target/linux/apm821xx/base-files/lib/preinit/79_move_config b/target/linux/apm821xx/base-files/lib/preinit/79_move_config index cb5e5c759d..37d35b663b 100644 --- a/target/linux/apm821xx/base-files/lib/preinit/79_move_config +++ b/target/linux/apm821xx/base-files/lib/preinit/79_move_config @@ -4,13 +4,14 @@ BOOTPART=/dev/sda1 move_config() { . /lib/functions.sh + . /lib/upgrade/common.sh case "$(board_name)" in wd,mybooklive) if [ -b $BOOTPART ]; then mkdir -p /boot mount -t ext4 -o rw,noatime $BOOTPART /boot - [ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz / + [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" / fi ;; *) |