Changeset 21810


Ignore:
Timestamp:
06/07/13 16:23:06 (11 years ago)
Author:
nit
Message:

[titan] activate backup/restore

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/global.h

    r21798 r21810  
    15261526                                if(ostrcmp("system_backup", child->name) == 0) child->locked = 1;
    15271527                        }
    1528                         // disable backup restore entry
    1529                         if(ostrcmp("system_backup_restore", child->name) == 0) child->locked = 1;
    15301528
    15311529                        if(checkbox("UFS910") == 0)
  • titan/titan/system_backup_restore.h

    r19839 r21810  
    1313        char* tmpstr = NULL, *infotext = NULL;
    1414
    15         infotext = "Press -restore- and your saved settings will be restored from your swapstick / recording hdd! The Box will restart automatically for restoring!\n\nPress -backup- to save your actual settings to swapstick / recording hdd.\nWARNING: The old backup will be deleted!\n\nWhile using the update function, your settings will be saved and restored automatically, if possible!";
     15        infotext = "Press -restore- and your saved settings will be restored from your swapstick / recording hdd! The Box will restart automatically for restoring!\n\nPress -backup- to save your actual settings to swapstick / recording hdd.\nWARNING: The old backup will be deleted!";
    1616
    1717        changetext(info, _(infotext));
     
    3434                                changetext(info, _("Please wait ...\n\nAll Settings are saved.\n\nBox will start in few seconds."));
    3535                                drawscreen(backup_restore, 0, 0);
    36                        
    37                                 if(isfile("/var/backup/.actbackup"))
     36
     37                                if(isfile("/tmp/.backupdev"))
    3838                                {
    39                                         FILE *fd; fd = fopen("/var/backup/.firstrun", "w");
    40                                         if(fd != NULL) fclose(fd);
    41                                         oshutdown(2, 1);
    42                                 }
    43                                 else if(isfile("/tmp/.backupdev"))
    44                                 {
    45                                         //this is a small workaround until the file .actbackup exists everywhere....
    46                                         FILE *fd; fd = fopen("/var/backup/.firstrun", "w");
    47                                         if(fd != NULL) fclose(fd);
    48                                         oshutdown(2, 1);
     39                                        ret = system("/sbin/settings.sh restore > /tmp/backup.log 2>&1");
     40                                        if(ret != 0)
     41                                                textbox(_("Message"), _("Restore failed, see log"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 7, 0);
     42                                  else
     43                                  {
     44                                                if(textbox(_("Message"), _("Update Plugins to new Version?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1)
     45                                                        screenextensions(3, NULL, 1);
     46                                                ret = system("init 6");
     47                                        }
    4948                                }
    5049                                else
     
    5554                                        drawscreen(backup_restore, 0, 0);
    5655                                }
    57                         }else
     56                        }
     57                        else
    5858                        {
    5959                                drawscreen(backup_restore, 0, 0);
     
    7979                                writeallconfig(1);
    8080                               
    81                                 ret = system("/sbin/settings.sh titan backup > /tmp/backup.log 2>&1");
    82                                
     81                                ret = system("/sbin/settings.sh backup > /tmp/backup.log 2>&1");
     82       
    8383                                changetitle(backup_restore, _("Backup / Restore Settings"));
    8484                                changetext(info, _(infotext));
Note: See TracChangeset for help on using the changeset viewer.