aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/base-files/lib/preinit
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mvebu/base-files/lib/preinit')
-rw-r--r--target/linux/mvebu/base-files/lib/preinit/79_move_config2
-rw-r--r--target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg10
-rw-r--r--target/linux/mvebu/base-files/lib/preinit/82_uDPU8
3 files changed, 10 insertions, 10 deletions
diff --git a/target/linux/mvebu/base-files/lib/preinit/79_move_config b/target/linux/mvebu/base-files/lib/preinit/79_move_config
index 640fb5cdad..195be0e137 100644
--- a/target/linux/mvebu/base-files/lib/preinit/79_move_config
+++ b/target/linux/mvebu/base-files/lib/preinit/79_move_config
@@ -18,7 +18,7 @@ move_config() {
esac
mkdir -p /boot
mount -o rw,noatime "/dev/$partdev" /boot
- [ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
+ [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
umount /boot
fi
}
diff --git a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
index b107eacb11..83448e5ace 100644
--- a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
+++ b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
@@ -4,8 +4,8 @@
#
preinit_mount_syscfg() {
-
. /lib/functions.sh
+ . /lib/upgrade/common.sh
case $(board_name) in
linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom)
@@ -22,12 +22,12 @@ preinit_mount_syscfg() {
fi
mkdir /tmp/syscfg
mount -t ubifs ubi1:syscfg /tmp/syscfg
- [ -f /tmp/syscfg/sysupgrade.tgz ] && {
+ [ -f "/tmp/syscfg/$BACKUP_FILE" ] && {
echo "- config restore -"
cd /
- mv /tmp/syscfg/sysupgrade.tgz /tmp
- tar xzf /tmp/sysupgrade.tgz
- rm -f /tmp/sysupgrade.tgz
+ mv "/tmp/syscfg/$BACKUP_FILE" /tmp
+ tar xzf "/tmp/$BACKUP_FILE"
+ rm -f "/tmp/$BACKUP_FILE"
sync
}
;;
diff --git a/target/linux/mvebu/base-files/lib/preinit/82_uDPU b/target/linux/mvebu/base-files/lib/preinit/82_uDPU
index 937a0a5f21..12bbfc3725 100644
--- a/target/linux/mvebu/base-files/lib/preinit/82_uDPU
+++ b/target/linux/mvebu/base-files/lib/preinit/82_uDPU
@@ -4,8 +4,8 @@
#
preinit_mount_udpu() {
-
. /lib/functions.sh
+ . /lib/upgrade/common.sh
case $(board_name) in
methode,udpu)
@@ -15,10 +15,10 @@ preinit_mount_udpu() {
if [ -b "${mmcdev}p4" ]; then
mkdir /misc
mount -t f2fs ${mmcdev}p4 /misc
- [ -f "/misc/sysupgrade.tgz" ] && {
+ [ -f "/misc/$BACKUP_FILE" ] && {
echo "- Restoring configuration files -"
- tar xzf /misc/sysupgrade.tgz -C /
- rm -f /misc/sysupgrade.tgz
+ tar xzf "/misc/$BACKUP_FILE" -C /
+ rm -f "/misc/$BACKUP_FILE"
sync
}
[ -f "/misc/firmware/recovery.itb" ] && {