Fixed configbackup init script not backing up files (#304)

* Fixed configbackup init script not backing up files

The /configs directory isn't mounted at this point in the boot process,
as a result this backup doesn't actually work and just copies an empty
directory every time.

* Tested on T20 and added missing /configs mount in backup script
This commit is contained in:
Leo 2022-09-27 18:50:56 -06:00 committed by GitHub
parent b7c27c73bd
commit 9973c5869d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,9 @@ case "$1" in
echo "Factory configs backup directory present, not backing up again"
else
echo "Backup /configs"
mount -t jffs2 /dev/mtdblock6 /configs
cp -R /configs/ /opt/.wz_backup/
umount /configs
fi
elif [ -f /opt/wz_mini/tmp/.T20 ]; then
echo "T20 platform backup"
@ -33,14 +35,18 @@ case "$1" in
echo "Factory configs backup directory present, not backing up again"
else
echo "Backup /configs"
mount -t jffs2 /dev/mtdblock8 /configs
cp -R /configs/ /opt/.wz_backup/
umount /configs
fi
if [ -d /opt/.wz_backup/params ]; then
echo "Factory params backup directory present, not backing up again"
else
echo "Backup /params"
mount -t jffs2 /dev/mtdblock9 /params
cp -R /params/ /opt/.wz_backup/
umount /params
fi
fi
;;