Changeset f9da4652


Ignore:
Timestamp:
08/21/13 07:17:42 (11 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
4f9718b
Parents:
e913299
Message:

Fix copying files to USB stick

File:
1 edited

Legend:

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

    r96c5e841 rf9da4652  
    344344  QStringList list; 
    345345  for(int i=0; i<out.length(); i++){ 
    346     if(out[i].startsWith("/dev/da") && out[i].contains("(msdosfs,local)")){ 
     346      if(out[i].startsWith("/dev/da") && out[i].contains("(msdosfs,")){ 
    347347      QString mountpoint = out[i].section(" on ",1,1).section("(",0,0).simplified(); 
    348348      QString devnode = out[i].section(" on ",0,0).section("/",-1).simplified(); 
     
    354354 
    355355bool LPBackend::copySSHKey(QString mountPath, QString localHost){ 
    356   QString publicKey = "/root/.ssh/id_rsa.pub"; 
     356  QString publicKey = "/root/.ssh/id_rsa"; 
    357357  //copy the file onto the designated USB stick 
    358358  if(!mountPath.endsWith("/")){ mountPath.append("/"); } 
    359   mountPath.append("root/.ssh/"+localHost+"-id_rsa.pub"); 
     359  QDir lDir=mountPath + "lpreserver"; 
     360  if ( ! lDir.exists() ) 
     361     lDir.mkdir(lDir.path()); 
     362 
     363  mountPath.append("lpreserver/"+localHost+"-id_rsa"); 
     364 
    360365  bool ok = QFile::copy(publicKey, mountPath); 
    361366  return ok; 
Note: See TracChangeset for help on using the changeset viewer.