- update: ask for copy settings to new image

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2017-10-27 13:17:17 +02:00
committed by Thilo Graf
parent 68d8319d2d
commit 4a5adfcb23
5 changed files with 19 additions and 0 deletions

View File

@@ -621,6 +621,21 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey)
{
showGlobalStatus(100);
// create settings package
int copy_settings = ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_FLASHUPDATE_COPY_SETTINGS, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_UPDATE);
if (copy_settings == CMsgBox::mbrYes)
{
CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_SETTINGS_BACKUP);
hintBox.paint();
/*
Settings tarball is created in /tmp directory.
ofgwrite will copy this tarball to new rootfs.
It's untared at first start of new image.
*/
my_system(3, "/bin/backup.sh", "/tmp", "backup_flash.tar.gz");
hintBox.hide();
}
// get active partition
char c[2] = {0};
FILE *f;