Changeset 954b109


Ignore:
Timestamp:
05/15/14 11:14:29 (13 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
2cb96b7
Parents:
7b6669b (diff), 04196c6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:pcbsd/pcbsd

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-sysinstall/backend/functions-bsdlabel.sh

    r9174840 r04196c6  
    649649  fi 
    650650 
    651   if [ "${USINGENCROOT}" = "0" -a "${USINGBOOTPART}" != "0" ] 
    652   then 
    653     exit_err "ERROR: Can't encrypt (/) with no (/boot) partition!" 
    654   fi 
    655651}; 
    656652 
  • src-sh/pc-sysinstall/backend/functions-newfs.sh

    r8378d50 r04196c6  
    164164      if [ -e "${PARTDIR}-enc/${PART}-encpass" ] ; then 
    165165        # Using a passphrase 
    166         rc_halt "dd if=/dev/random of=${GELIKEYDIR}/${PART}.key bs=64 count=1" 
    167166        rc_halt "geli init -J ${PARTDIR}-enc/${PART}-encpass ${PARTDEV}" 
    168167        rc_halt "geli attach -j ${PARTDIR}-enc/${PART}-encpass ${PARTDEV}" 
  • src-qt4/life-preserver/lp-gui/LPBackend.cpp

    r76295fb r7b6669b  
    168168//    Snapshop Management 
    169169// ================== 
    170 void LPBackend::newSnapshot(QString dataset, QString snapshotname){ 
     170void LPBackend::newSnapshot(QString dataset, QString snapshotname, QString snapshotcomment){ 
    171171  //This needs to run externally - since the snapshot is simply added to the queue, and the replication 
    172172  //   afterwards may take a long time. 
    173    bool ok; 
    174    QString comment = QInputDialog::getText (0, QObject::tr("Snapshot comment"), QObject::tr("Snapshot comment"), QLineEdit::Normal, "GUI snapshot", &ok); 
    175    if ( ! ok ) 
    176      comment = "GUI snapshot"; 
    177  
    178   QString cmd = "lpreserver mksnap " + dataset + " " + snapshotname.replace(" ", "") + " \"" + comment +"\""; 
     173  QString cmd = "lpreserver mksnap " + dataset + " " + snapshotname.replace(" ", "") + " \"" + snapshotcomment +"\""; 
    179174  QProcess::startDetached(cmd); 
    180175    
  • src-qt4/life-preserver/lp-gui/LPBackend.h

    rc246252 r7b6669b  
    2626        static bool datasetInfo(QString dataset, int& time, int& numToKeep); //get current settings for a dataset 
    2727        //Snapshop Management 
    28         static void newSnapshot(QString dataset, QString snapshotname); 
     28        static void newSnapshot(QString dataset, QString snapshotname, QString snapshotcomment = ""); 
    2929        static bool removeSnapshot(QString dataset, QString snapshot); 
    3030        static bool revertSnapshot(QString dataset, QString snapshot); //revert to given snapshot 
  • src-qt4/life-preserver/lp-gui/LPContainers.h

    r6a2483b r7b6669b  
    1919        QString poolStatus; 
    2020        QHash<QString,QStringList> subsetHash; //<subset, snapshot list> (complete dataset name should be <ds><subset>) 
     21        QHash<QString, QString> snapComment; //<snapshot, comment> 
    2122         
    2223        //Simplification functions for getting info from the hash 
     
    2930          } 
    3031        } 
     32        QStringList allSnapshots(){ return QStringList(snapComment.keys()); } 
     33        QString snapshotComment(QString snap){ 
     34          if(snapComment.contains(snap)){ 
     35            return snapComment[snap]; 
     36          }else{ 
     37            return ""; 
     38          } 
     39        } 
    3140}; 
    3241 
  • src-qt4/life-preserver/lp-gui/LPGUtils.cpp

    rc246252 r7b6669b  
    1010  QStringList lpsnapcomments; 
    1111  QStringList lpsnaps = LPBackend::listLPSnapshots(zpool, lpsnapcomments); 
     12  //Fill the snapshots/comments hash 
     13  for(int i=0; i<lpsnaps.length() && i<lpsnapcomments.length(); i++){ 
     14    DSC.snapComment.insert(lpsnaps[i], lpsnapcomments[i]); 
     15  } 
    1216  //populate the list of snapshots available for each mountpoint 
    1317  for(int i=0; i<subsets.length(); i++){ 
  • src-qt4/life-preserver/lp-gui/LPMain.cpp

    rc246252 r7b6669b  
    258258     
    259259    //Now update the snapshot removal menu list 
    260     QStringList snapComments; 
    261     QStringList snaps = LPBackend::listLPSnapshots(ui->combo_pools->currentText(), snapComments); 
     260    //QStringList snapComments; 
     261    QStringList snaps = POOLDATA.allSnapshots(); //LPBackend::listLPSnapshots(ui->combo_pools->currentText(), snapComments); 
    262262    ui->menuDelete_Snapshot->clear(); 
    263263    for(int i=0; i<snaps.length(); i++){ 
    264        ui->menuDelete_Snapshot->addAction(snaps[i] + " (" + snapComments[i] + ")" ); 
     264       QString comment = POOLDATA.snapshotComment(snaps[i]).simplified(); 
     265        if(comment.isEmpty()){ ui->menuDelete_Snapshot->addAction(snaps[i]); } 
     266        else{ ui->menuDelete_Snapshot->addAction(snaps[i] + " (" + comment + ")" ); } 
    265267    } 
    266268    ui->menuDelete_Snapshot->setEnabled( !ui->menuDelete_Snapshot->isEmpty() ); 
     
    333335    QString path = ui->combo_datasets->currentText() + "/.zfs/snapshot/"+snap; 
    334336    //qDebug() << "Snapshot path:" << path; 
    335     ui->label_snapshot->setText(snap); 
     337    QString comment = POOLDATA.snapshotComment(snap).simplified(); 
     338    if(comment.isEmpty()){ ui->label_snapshot->setText(snap); } 
     339    else{ ui->label_snapshot->setText(snap+" ("+comment+")"); } 
    336340    //Now update the snapshot view 
    337341    ui->treeView->setRootIndex( fsModel->setRootPath(path) ); 
     
    361365  QFileInfo info(filePath);      
    362366  QString destDir = filePath; 
    363         destDir.remove("/.zfs/snapshot/"+ui->label_snapshot->text()); 
     367        destDir.remove("/.zfs/snapshot/"+ui->label_snapshot->text().section("(",0,0).simplified()); 
    364368        destDir.chop( filePath.section("/",-1).size()+1 ); //get rid of the filename at the end 
    365369        while(!QFile::exists(destDir)){ destDir.chop( destDir.section("/",-1).size() +1); } 
     
    739743  QString name = QInputDialog::getText(this,tr("New Snapshot Name"), tr("Snapshot Name:"), QLineEdit::Normal, tr("Name"), &ok, 0, Qt::ImhUppercaseOnly | Qt::ImhLowercaseOnly | Qt::ImhDigitsOnly ); 
    740744  if(!ok || name.isEmpty()){ return; } //cancelled 
    741   qDebug() << "Creating a new snapshot:" << ds << name; 
     745  //Now get the comment 
     746   QString comment = QInputDialog::getText (this, QObject::tr("Snapshot comment"), QObject::tr("Snapshot comment"), QLineEdit::Normal, tr("GUI Snapshot"), &ok); 
     747   if (!ok){ comment = tr("GUI Snapshot"); } 
     748  qDebug() << "Creating a new snapshot:" << ds << name << comment; 
    742749  //Now create the new snapshot 
    743   LPBackend::newSnapshot(ds,name); 
     750  LPBackend::newSnapshot(ds,name, comment); 
    744751  QMessageBox::information(this,tr("Snapshot Pending"), tr("The new snapshot creation has been added to the queue")); 
    745752  updateTabs(); 
     
    752759  qDebug() << "Remove Snapshot:" << snapshot; 
    753760  //verify snapshot removal 
    754   if( QMessageBox::Yes == QMessageBox::question(this,tr("Verify Snapshot Deletion"),QString(tr("Do you wish to delete this snapshot? %1 (%2)")).arg(pool+"/"+snapshot).arg(comment)+"\n"+tr("WARNING: This is a permanant change that cannot be reversed"),QMessageBox::Yes | QMessageBox::No, QMessageBox::No) ){ 
     761  if( QMessageBox::Yes == QMessageBox::question(this,tr("Verify Snapshot Deletion"),QString(tr("Do you wish to delete this snapshot? %1 (%2)")).arg(pool+"/"+snapshot, comment)+"\n"+tr("WARNING: This is a permanant change that cannot be reversed"),QMessageBox::Yes | QMessageBox::No, QMessageBox::No) ){ 
    755762    bool ok = LPBackend::removeSnapshot(ui->combo_pools->currentText(), snapshot); 
    756763    if(ok){ 
Note: See TracChangeset for help on using the changeset viewer.