/[smeserver]/cdrom.image/product/installclasses/smeinstallclass.py
ViewVC logotype

Diff of /cdrom.image/product/installclasses/smeinstallclass.py

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.14 by slords, Sat Apr 29 03:10:19 2006 UTC Revision 1.15 by slords, Thu Aug 3 14:12:52 2006 UTC
# Line 111  class InstallClass(BaseInstallClass): Line 111  class InstallClass(BaseInstallClass):
111              dispatch.skipStep("partition", skip = 1)              dispatch.skipStep("partition", skip = 1)
112    
113      def setDefaultPartitioning(self, partitions, clear = CLEARPART_TYPE_LINUX, doClear = 1):      def setDefaultPartitioning(self, partitions, clear = CLEARPART_TYPE_LINUX, doClear = 1):
114            uniqueID = 100
115            raid1 = []
116            raid2 = []
117            (swapMin, swapMax) = iutil.swapSuggestion()
118    
119          diskset = partedUtils.DiskSet()          diskset = partedUtils.DiskSet()
120          drives = diskset.driveList()          drives = diskset.driveList()
         if len(drives) > 0:  
             uniqueID = 100  
             raid1 = []  
             raid2 = []  
             (swapMin, swapMax) = iutil.swapSuggestion()  
121    
122              for drive in drives:          for drive in drives:
123                if not isys.driveIsRemovable(drive):
124                  filesystem = fileSystemTypeGet("software RAID")                  filesystem = fileSystemTypeGet("software RAID")
125                  request = partRequests.PartitionSpec(filesystem, drive=[drive], size=100, primary=1, format=1)                  request = partRequests.PartitionSpec(filesystem, drive=[drive], size=100, primary=1, format=1)
126                  request.uniqueID = uniqueID                  request.uniqueID = uniqueID
# Line 135  class InstallClass(BaseInstallClass): Line 136  class InstallClass(BaseInstallClass):
136    
137                  uniqueID = uniqueID + 1                  uniqueID = uniqueID + 1
138    
139            if len(raid2) > 0:
140              filesystem = fileSystemTypeGet("ext3")              filesystem = fileSystemTypeGet("ext3")
141              request = partRequests.RaidRequestSpec(filesystem, mountpoint="/boot", raidminor=1,              request = partRequests.RaidRequestSpec(filesystem, mountpoint="/boot", raidminor=1,
142                      raidmembers=raid1, raidlevel="RAID1", format=1, raidspares=0)                      raidmembers=raid1, raidlevel="RAID1", format=1, raidspares=0)
143              partitions.autoPartitionRequests.append(request)              partitions.autoPartitionRequests.append(request)
144    
145              if len(drives) > 5:              if len(raid2) > 5:
146                  raidLevel = "RAID6"                  raidLevel = "RAID6"
147              elif len(drives) > 2:              elif len(raid2) > 2:
148                  raidLevel = "RAID5"                  raidLevel = "RAID5"
149              else:              else:
150                  raidLevel = "RAID1"                  raidLevel = "RAID1"


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed