Changeset 959fb5c


Ignore:
Timestamp:
08/06/13 12:09:45 (13 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
7e0e98c
Parents:
f615958 (diff), d5ff236 (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:
6 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-mounttray/menuItem.cpp

    r1620346 r940aaf0  
    106106bool MenuItem::isMounted(){ 
    107107  //Check if device is mounted 
     108  QStringList chk = pcbsd::Utils::runShellCommand("mount"); 
     109  bool mounted=false; 
     110  for(int i=0; i<chk.length(); i++){ 
     111    mounted = chk[i].contains(device) || chk[i].contains(devLabel->text()) || chk[i].contains(devLabel->text().replace(" ","-")); 
     112    if(mounted){  
     113      //Save the mountpoint if it is mounted 
     114      mountpoint = chk[i].section(" on ",1,10).section("(",0,0).simplified(); 
     115      break;  
     116    } 
     117  } 
     118  return mounted; 
     119  /* 
    108120  QString chk = pcbsd::Utils::runShellCommandSearch("mount",device);   
    109121  if(chk.isEmpty() ){ chk = pcbsd::Utils::runShellCommandSearch("mount",devLabel->text().replace(" ","-")); }  
    110  
    111122  if(chk.isEmpty() ){ return FALSE; } 
    112123  else{ return TRUE; } 
     124  */ 
    113125} 
    114126 
     
    248260void MenuItem::unmountItem(){ 
    249261  //Unmount the device 
    250  
     262         
    251263  //Check to see if the current mountpoint exists or if it is somewhere else 
    252264  if( !QFile::exists(mountpoint) ){ 
    253     if( isMounted() ){  //double check that it is actually mounted 
    254       //mounted someplace else - find it 
    255       QString output = pcbsd::Utils::runShellCommandSearch("mount",device); 
    256       mountpoint = output.section(" on ",1,1).section(" (",0,0).replace(" ","-"); 
    257     }else{ 
     265    if( !isMounted() ){  //double check that it is actually mounted (and fix the mountpoint) 
    258266      //it is not mounted to begin with 
    259267      return; 
    260268    } 
    261269  } 
    262    
    263   QString cmd1 = "umount " + mountpoint; 
    264   QString cmd2 = "rmdir " + mountpoint; 
     270  //Make sure there are no spaces in the mounpoint path 
     271  QString cmd1 = "umount \"" + mountpoint +"\""; 
     272  QString cmd2 = "rmdir \"" + mountpoint +"\""; 
    265273  qDebug() << "Unmounting device from" << mountpoint; 
    266274  //Run the commands 
     
    297305  bool ok = FALSE; 
    298306  if(isMounted()){ 
    299     QString cmd = "df "+mountpoint; 
     307    QString cmd = "df \""+mountpoint+"\""; 
    300308    QStringList output = systemCMD(cmd); //make sure we use the one with a 1K blocksize 
    301309    if(output.length() > 1){ 
  • src-qt4/pc-mounttray/mountTray.cpp

    ra275da91 rd5ff236  
    311311  //Open the default file manager to the given directory as that user 
    312312  qDebug() << "Opening the media directory with user permissions"; 
    313   QString cmd = "su -m "+USERNAME+" -c \'"+FILEMAN+" "+dir+"\' &"; 
     313  QString cmd = "su -m "+USERNAME+" -c \'"+FILEMAN+" \""+dir+"\"\' &"; 
    314314  if(DEBUG_MODE){ qDebug() << " -cmd:" << cmd; } 
    315315  system( cmd.toUtf8() );  
  • src-sh/lpreserver/backend/functions.sh

    rfeb0fb0 rf615958  
    105105 
    106106   case $2 in 
    107        daily) cLine="0      01       *       *       *" ;; 
     107       daily) cLine="0       $4      *       *       *" ;; 
    108108      hourly) cLine="0       *       *       *       *" ;; 
    109109       30min) cLine="0,30    *       *       *       *" ;; 
  • src-sh/lpreserver/backend/zfscronsnap.sh

    r1fd551d rf615958  
    2222 
    2323  TIME="${3}" 
     24 
     25  # See if the user is running daily with a hour specified 
     26  echo $TIME | grep -q "daily" 
     27  if [ $? -eq 0 ] ; then 
     28     hour="`echo $TIME | cut -d '@' -f 2`" 
     29     if [ -z "$hour" ] ; then hour="22" ; fi 
     30     TIME="daily" 
     31  fi 
     32 
    2433  COUNT="${4}" 
    2534  case $TIME in 
     
    3140  fi 
    3241 
    33   enable_cron "$DATASET" "$TIME" "$COUNT" 
    34   echo "Snapshot frequency set: $TIME" 
     42  enable_cron "$DATASET" "$TIME" "$COUNT" "$hour" 
     43  echo "Snapshot frequency set: $TIME @ $hour" 
    3544  echo "Snapshot # to keep set: $COUNT" 
    3645  exit 0 
  • src-sh/lpreserver/backend/zfslistcron.sh

    r1fd551d rf615958  
    1919   hour=`grep "${PROGDIR}/backend/runsnap.sh" /etc/crontab | awk '{print $2}'` 
    2020   time="Min: $min Hour: $hour"; 
    21    if [ "$min" = "0" -a "$hour" = "01" ] ; then time="daily" ; fi 
     21   if [ "$min" = "0" -a "$hour" != '*' ] ; then time="daily@$hour" ; fi 
    2222   if [ "$min" = "0" -a "$hour" = '*' ] ; then time="hourly" ; fi 
    2323   if [ "$min" = "0,30" ] ; then time="30min" ; fi 
  • src-sh/lpreserver/lpreserver

    rfeb0fb0 rf615958  
    208208   
    209209  action = start / stop 
    210   frequency = daily / hourly / 30min / 10min / 5min 
     210  frequency = daily@XX / hourly / 30min / 10min / 5min 
     211                    ^^ Hour to execute 
    211212  numToKeep = Number of snapshots to keep total 
    212213 
    213214Example: 
    214215 
    215   lpreserver cronsnap tank1/usr/home/kris start daily 10 
     216  lpreserver cronsnap tank1/usr/home/kris start daily@22 10 
    216217 
    217218  or 
Note: See TracChangeset for help on using the changeset viewer.