Changeset 033a33f


Ignore:
Timestamp:
07/31/13 14:36:18 (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
Children:
21a1adc, 74c359f
Parents:
6e77702 (diff), 44ec5ba (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:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • src-sh/lpreserver/backend/zfscronsnap.sh

    rc684936 r1fd551d  
    3333  enable_cron "$DATASET" "$TIME" "$COUNT" 
    3434  echo "Snapshot frequency set: $TIME" 
    35   echo "Snapshot days to keep set: $COUNT" 
     35  echo "Snapshot # to keep set: $COUNT" 
    3636  exit 0 
    3737fi 
  • src-sh/lpreserver/lpreserver

    r8c2bd1a r1fd551d  
    4747     mksnap - Create a ZFS snapshot of a zpool/dataset 
    4848   listsnap - List snapshots of a zpool/dataset 
     49   listcron - Listing of scheduled snapshots 
    4950   cronsnap - Schedule snapshot creation via cron 
    5051 revertsnap - Revert zpool/dataset to a snapshot 
     52  replicate - Enable / Disable ZFS replication to a remote system 
    5153     rmsnap - Remove a snapshot 
    5254__EOF__ 
    5355}; 
     56 
     57help_replicate() 
     58{ 
     59 title 
     60 echo "Help replicate 
     61 
     62Life-Preserver replication sub-system 
     63 
     64Replication uses ZFS to send your snapshots to a remote system which also has 
     65a ZFS pool, such as FreeNAS or another PC-BSD system. The <hostdataset> must 
     66also be scheduled for snapshots for replication to occur.  
     67 
     68Available Flags: 
     69        list - List replication targets 
     70         add - Add a new replication target 
     71      remove - Remove a replication target 
     72 
     73Add Options: 
     74 
     75        add <remotehost> <user> <port> <hostdataset> <remotedataset> <time> 
     76 
     77        Example 1:  
     78 
     79        add freenas.8343 backupuser 22 tank1/usr/home/kris tankbackup/backups sync 
     80 
     81        Will schedule replication of tank1/usr/home/kris to tankbackup/backups with each snapshot 
     82 
     83        Example 2:  
     84 
     85        add freenas.8343 backupuser 22 tank1 tankbackup/backups 22 
     86 
     87        Will schedule replication of tank1 to tankbackup/backups at 10PM, notated in 24hour time 
     88 
     89Remove Options: 
     90 
     91        remove <id> 
     92         
     93        Remove a replication task indicated by <id> 
     94        Use 'replicate list' for a list of IDs.  
     95 
     96Usage: 
     97 
     98  lpreserver replicate <subcmd> <flags> 
     99 
     100Example: 
     101 
     102  lpreserver replicate 
     103" 
     104}; 
     105 
    54106 
    55107help_set() 
     
    106158}; 
    107159 
     160help_listcron() 
     161{ 
     162 title 
     163 echo "Help listcron 
     164 
     165List scheduled cron snapshots 
     166 
     167Usage: 
     168 
     169  lpreserver listcron 
     170" 
     171}; 
    108172 
    109173help_listsnap() 
     
    231295           set) help_set ;; 
    232296           mksnap) help_mksnap ;; 
     297           listcron) help_listcron ;; 
    233298           listsnap) help_listsnap ;; 
    234299           revertsnap) help_revertsnap ;; 
     300           replicate) help_replicate ;; 
    235301           cronsnap) help_cronsnap ;; 
    236302           rmsnap) help_rmsnap ;; 
     
    280346         ;; 
    281347 
     348 listcron) require_root 
     349         ${PROGDIR}/backend/zfslistcron.sh  
     350         ;; 
     351 
    282352 listsnap) require_root 
    283353         DATASET="$2" 
  • src-qt4/pc-mounttray/mountTray.cpp

    r242767e r6e77702  
    189189   
    190190  if(DEBUG_MODE){ qDebug() << "Checking for Device Changes:"; } 
    191   //oldsysdev is the old device list for the system 
    192   QStringList osd = oldsysdev; 
     191  //Get the current list of devices 
    193192  QStringList nsd = DCheck->devChildren(""); 
    194   nsd.sort(); 
    195   oldsysdev = nsd; //save the new list as the old list for later 
    196   //Now determine new/missing devices 
    197   nsd.sort(); 
    198   QStringList rmList; 
    199   for(int i=0; i<osd.length(); i++){ 
    200     int ni = nsd.indexOf(osd[i]); //new index 
    201     if( ni == -1){ //device removed 
    202       rmList << osd[i]; 
    203       osd.removeAt(i); 
     193  //Remove all the currently managed devices 
     194  for(int i=0; i<deviceList.length(); i++){ 
     195    QString dev = deviceList[i]->device; 
     196    int ni = nsd.indexOf(dev); 
     197    if(ni == -1){ 
     198      //Device Removed 
     199      removeDevice(dev); 
    204200      i--; 
    205     }else{ //both lists have device 
    206       osd.removeAt(i); i--; 
     201    }else{ 
     202      //Probe the device for validity if not currently mounted 
     203      if( !deviceList[i]->isMounted() ){ 
     204        QString ja, jb, jc, jd; //junk variables 
     205        if( !DCheck->devInfo(dev,&ja,&jb,&jc,&jd) ){ 
     206          //no longer valid device 
     207          removeDevice(dev); 
     208          i--; 
     209        } 
     210      } 
    207211      nsd.removeAt(ni); 
    208212    } 
    209213  } 
    210   //all that is left in nsd is the new additions 
    211  
    212   //Remove any devices that have been disconnected 
    213   if(DEBUG_MODE){ qDebug() << " -Device Removals:" << rmList; } 
    214   for(int i=0; i<rmList.length(); i++){ 
    215     removeDevice(rmList[i]); 
    216   } 
    217   //Add any devices that have been connected 
    218   if(DEBUG_MODE){ qDebug() << " -Device Additions:" << nsd; }  
     214  //Now Iterate through all available devices and probe them for validity 
     215  // (This should catch devices that do not "announce" their presence by creating a new device node) 
    219216  for(int i=0; i<nsd.length(); i++){ 
    220217    //Check if it is a good device 
     
    232229    } 
    233230  } 
    234   //==== CD/DVD Devices ==== 
    235   //Always check cd/dvd devices because the device node will never be added/removed 
    236   QStringList diskList; 
    237   diskList << DCheck->devChildren("cd"); 
    238   diskList << DCheck->devChildren("acd"); 
    239   if(DEBUG_MODE){ qDebug() << " -Checking CD/DVD devices:" << diskList; } 
    240   for(int i=0; i<diskList.length(); i++){ 
    241     if( rmList.contains(diskList[i]) || nsd.contains(diskList[i]) ){ 
    242       continue; //do not double check a device that was just checked;        
    243     } 
    244     //Check if it is a good device 
    245     QString dlabel, dtype, dfs, dsize; //additional output info 
    246     bool good = DCheck->devInfo(diskList[i],&dtype,&dlabel,&dfs,&dsize); 
    247     if(good){ 
    248       //Now create a new entry for this device 
    249       addDevice(diskList[i],dlabel,dtype,dfs);   
    250       //Show a message bubble 
    251       if(showPopup){ 
    252         QString title = tr("New Device"); 
    253         QString message = QString( tr("%1 can now be accessed")).arg(dlabel); 
    254         slotDisplayPopup(title, message); 
    255       } 
    256     }else{ //not good device 
    257       removeDevice(diskList[i]);             
    258     } 
    259   } //end loop over cd/dvd devices 
    260231   
    261232  //Run the disk space check if appropriate 
Note: See TracChangeset for help on using the changeset viewer.