Changeset 1995136


Ignore:
Timestamp:
01/27/15 09:38:40 (7 months ago)
Author:
Kris Moore <kris@…>
Branches:
releng/10.1.1
Children:
982cea4
Parents:
1201d77 (diff), e0452f1 (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 'releng/10.1.1' of github.com:pcbsd/pcbsd into releng/10.1.1

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src-qt5/pc-mounttray/DeviceWidget.cpp

    r9352a7e r0eb37cc  
    250250void DeviceWidget::OpenTrayClicked(){   
    251251  //Open the CD tray 
     252  if(isMounted){ mountButtonClicked(); } //unmount the device before opening the tray 
     253  if(isMounted){ return; } //Could not unmount device: don't open the tray 
    252254  QProcess::startDetached("cdcontrol eject /dev/"+node()); 
    253255  emit CloseMenu(); 
  • src-sh/pcbsd-utils/pc-sysconfig/daemon/Backend-remdev.cpp

    r7f427cd re0452f1  
    3636    if(!node.isEmpty() && !QFile::exists(node)){ invalid = true; } 
    3737    else if(mntdir.isEmpty()){ invalid = true; } //required for unmounting 
    38     else{ 
     38    else if( info.filter(mntdir).isEmpty() ){ //not currently listed by "mount" 
    3939      QDir dir(mntdir); 
    4040      if(!dir.exists()){ invalid = true; } 
     
    4949    if(invalid){ 
    5050      //Remove this entry from the list 
    51       qDebug() << "Removing Internal Mount Info:" << IntMountPoints[i]; 
     51      //qDebug() << "Removing Internal Mount Info:" << IntMountPoints[i]; 
    5252      IntMountPoints.removeAt(i); 
    5353      i--; 
     
    7575    } 
    7676  } 
     77} 
     78 
     79void Backend::cleanMediaDir(){ 
     80  updateIntMountPoints(); 
     81  QDir media("/media"); 
     82  QStringList dirs = media.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name); 
     83  for(int i=0; i<dirs.length(); i++){ 
     84    if( !IntMountPoints.contains(DELIM+media.absoluteFilePath(dirs[i])) ){ 
     85      //Nothing mounted here (or on a child directory) 
     86      // This will fail if there is anything in the directory (don't bother duplicating Qt checks) 
     87      media.rmdir("/media/"+dirs[i]);  
     88    } 
     89  } 
     90   
    7791} 
    7892 
  • src-sh/pcbsd-utils/pc-sysconfig/daemon/Backend.h

    r1d3314b r55fed4a  
    2222          CPART = findActiveDevices(); //detect which partition/device is currently in use 
    2323          updateIntMountPoints(); //update the internal list of mount points 
     24          cleanMediaDir(); 
    2425        } 
    2526        ~Backend(){ 
     
    109110        QStringList IntMountPoints; //Internal Mount points created by this utility (will be removed on cleanup) 
    110111        void updateIntMountPoints(); //Update the internal list 
    111  
     112        void cleanMediaDir(); //To be run on startup - clean up any leftover mountpoint (in case of crash, etc) 
     113         
    112114        QStringList devChildren(QString dev); 
    113115        QStringList findActiveDevices(); //list FreeBSD device nodes that are active 
  • src-sh/pcbsd-utils/pc-sysconfig/daemon/MainDaemon.cpp

    re0c2a43 r55fed4a  
    1919  }else{ 
    2020    qDebug() << "Error: Device Daemon could not create pipe at /var/run/pc-sysconfig.pipe"; 
     21    exit(1); 
    2122  } 
    22    
    2323} 
    2424 
  • src-qt5/life-preserver/lp-gui/scripts/setup-ssh-keys.sh

    r3667cdb r1201d77  
    3535PUBKEY="`cat .ssh/id_rsa.pub`" 
    3636 
    37 echo $PUBKEY | ssh -p $SSHPORT $SSHUSER@$SSHHOST 'mkdir .ssh ; chmod 700 .ssh ; tee -a .ssh/authorized_keys ; chmod 644 .ssh/authorized_keys' 
     37echo $PUBKEY | ssh -p $SSHPORT $SSHUSER@$SSHHOST 'mkdir .ssh 2>/dev/null; chmod 700 .ssh ; tee -a .ssh/authorized_keys ; chmod 644 .ssh/authorized_keys' 
    3838 
    39 echo $PUBKEY | ssh -p $SSHPORT $SSHUSER@$SSHHOST 'mkdir .ssh ; chmod 700 .ssh ; tee -a .ssh/authorized_keys2 ; chmod 644 .ssh/authorized_keys2' 
     39echo $PUBKEY | ssh -p $SSHPORT $SSHUSER@$SSHHOST 'mkdir .ssh 2>/dev/null; chmod 700 .ssh ; tee -a .ssh/authorized_keys2 ; chmod 644 .ssh/authorized_keys2' 
    4040 
    4141if [ "$?" != "0" ]; then 
Note: See TracChangeset for help on using the changeset viewer.