Changeset 4a54eef


Ignore:
Timestamp:
08/21/13 08:16:09 (15 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
07e9b0f
Parents:
171831b
Message:

Clean up when the SSH key generation is automatically run, and remind the user if the remote host information changes to save the SSH Key to a USB stick

Location:
src-qt4/life-preserver
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/life-preserver/LPConfig.cpp

    r2a5e337 r4a54eef  
    105105   
    106106  //Replication Settings 
     107  bool updateSSHKey = false; 
    107108  if(isReplicated != ui->groupReplicate->isChecked()){ 
    108109    remoteChanged = true; 
    109110    isReplicated = ui->groupReplicate->isChecked(); 
     111    if(isReplicated){ updateSSHKey = true; } 
    110112  } 
    111113  QString tmp = ui->lineHostName->text().simplified(); 
    112   if( tmp != remoteHost ){ remoteChanged = true; remoteHost = tmp; } 
     114  if( tmp != remoteHost ){ remoteChanged = true; remoteHost = tmp; updateSSHKey=true;} 
    113115  tmp = ui->lineUserName->text().simplified(); 
    114   if( tmp != remoteUser ){ remoteChanged = true; remoteUser = tmp; } 
     116  if( tmp != remoteUser ){ remoteChanged = true; remoteUser = tmp; updateSSHKey=true;} 
    115117  tmp = ui->lineRemoteDataset->text().simplified(); 
    116118  if( tmp != remoteDataset ){ remoteChanged = true; remoteDataset = tmp; } 
    117   if( ui->spinPort->value() != remotePort){ remoteChanged = true; remotePort = ui->spinPort->value(); } 
     119  if( ui->spinPort->value() != remotePort){ remoteChanged = true; remotePort = ui->spinPort->value(); updateSSHKey=true;} 
    118120  int nFreq = -1; 
    119121  if(ui->radioRepTime->isChecked()){ 
     
    124126  }else{ 
    125127    if( nFreq != remoteFreq ){ remoteChanged = true; remoteFreq = nFreq; } 
     128  } 
     129  if(updateSSHKey){ 
     130    //Prompt for the SSH key generation 
     131    LPBackend::setupSSHKey(remoteHost, remoteUser, remotePort); 
    126132  } 
    127133} 
  • src-qt4/life-preserver/LPWizard.cpp

    r2a5e337 r4a54eef  
    3333    remoteUser = ui->lineUserName->text(); 
    3434    remoteDataset = ui->lineRemoteDataset->text(); 
     35    //Prompt for the SSH key generation 
     36    LPBackend::setupSSHKey(remoteHost, remoteUser, remotePort); 
    3537  } 
    3638  if(ui->radioDaily->isChecked()){ localTime = ui->timeEdit->time().hour(); } 
     
    4547    else{ totalSnapshots = ui->spin_keepDays->value() * (1440/(-localTime)); } //convert to number of snapshots a day 
    4648  } 
     49 
    4750  //Now close the UI 
    4851  this->close(); 
  • src-qt4/life-preserver/LPWizard.h

    r2a5e337 r4a54eef  
    55#include <QString> 
    66#include <QDebug> 
     7 
     8#include "LPBackend.h" 
    79 
    810namespace Ui{ 
  • src-qt4/life-preserver/mainUI.cpp

    r96c5e841 r4a54eef  
    239239  } 
    240240  if(CFG.remoteChanged){ 
    241     LPBackend::setupReplication(ds, CFG.remoteHost, CFG.remoteUser, CFG.remotePort, CFG.remoteDataset, CFG.remoteFreq); 
    242     change = true;         
     241    change = true; 
     242    if(CFG.isReplicated){ 
     243      LPBackend::setupReplication(ds, CFG.remoteHost, CFG.remoteUser, CFG.remotePort, CFG.remoteDataset, CFG.remoteFreq); 
     244      QMessageBox::information(this,tr("Reminder"),tr("Don't forget to save your SSH key to a USB stick so that you can restore your system from the remote host later!!")); 
     245    }else{ 
     246      LPBackend::removeReplication(ds); 
     247    } 
    243248  } 
    244249  //Now update the UI if appropriate 
     
    342347      if(wiz.enableReplication){ 
    343348         LPBackend::setupReplication(dataset, wiz.remoteHost, wiz.remoteUser, wiz.remotePort, wiz.remoteDataset, wiz.remoteTime);      
     349         QMessageBox::information(this,tr("Reminder"),tr("Don't forget to save your SSH key to a USB stick so that you can restore your system from the remote host later!!")); 
    344350      } 
    345351    } 
Note: See TracChangeset for help on using the changeset viewer.