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

Diff of /cdrom.image/sme9/product/installclasses/server.py

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

Revision 1.4 by charliebrady, Tue Jul 30 21:37:14 2013 UTC Revision 1.10 by wellsi, Mon Mar 24 01:45:52 2014 UTC
# Line 93  class InstallClass(BaseInstallClass): Line 93  class InstallClass(BaseInstallClass):
93      sortPriority = 90000      sortPriority = 90000
94      hidden = 0      hidden = 0
95    
96        bootloaderTimeoutDefault = 5
97      tasks = [(N_("Basic Server"),      tasks = [(N_("Basic Server"),
98                ["base", "core"]),                ["base", "core"]),
99               (N_("Minimal"),               (N_("Minimal"),
# Line 141  class InstallClass(BaseInstallClass): Line 142  class InstallClass(BaseInstallClass):
142          # If user specifies "noraid", then useRAID = False; otherwise, useRAID = True          # If user specifies "noraid", then useRAID = False; otherwise, useRAID = True
143          # If useRAID = False below, then RAID1 won't be used          # If useRAID = False below, then RAID1 won't be used
144    
145          useRAID_flag = not flags.cmdline.has_key("noraid")          if flags.cmdline.has_key("noraid"):
146                raidLevel = "none"
147          fstype = "ext3"          else:
148          if flags.cmdline.has_key("ext4"):              raidLevel = "1"
149              fstype = "ext4"              if flags.cmdline.has_key("raid") and flags.cmdline["raid"] in ["none","0","1","5","6"]:
150                    raidLevel = flags.cmdline["raid"]
151    
152            fstype = "ext4"
153            if flags.cmdline.has_key("ext3"):
154                fstype = "ext3"
155    
156          # /boot          # /boot
157          # Manually specify fstype = ext3/ext4 and size = 100 MB          # Manually specify fstype = ext3/ext4 and size = 250 MB
158          # (Platform default is fstype ext4 and size = 500 MB)          # (Platform default is fstype ext4 and size = 500 MB)
159    
160          autorequests.append(PartSpec(mountpoint="/boot", fstype=fstype, size=100, useRAID=useRAID_flag,          autorequests.append(PartSpec(mountpoint="/boot", fstype=fstype, size=250, raidLevel=raidLevel,
161                              weight=platform.weight(mountpoint="/boot")))                              weight=platform.weight(mountpoint="/boot")))
162    
163          # /          # /
164          # Manually specify fstype = ext3/ext4 and size = 2048 MB, but growable          # Manually specify fstype = ext3/ext4 and size = 2048 MB, but growable
165    
166          autorequests.append(PartSpec(mountpoint="/", fstype=fstype, size=2048, useRAID=useRAID_flag,          autorequests.append(PartSpec(mountpoint="/", fstype=fstype, size=2048, raidLevel=raidLevel,
167                              grow=True, asVol=asVol_flag))                              grow=True, asVol=asVol_flag))
168    
169          # swap          # swap
170          # Manually specify fstype = swap and minswap < size < maxswap (growable)          # Manually specify fstype = swap and minswap < size < maxswap (growable)
171    
172          (minswap, maxswap) = iutil.swapSuggestion()          (minswap, maxswap) = iutil.swapSuggestion()
173          autorequests.append(PartSpec(fstype="swap", size=minswap, maxSize=maxswap, useRAID=useRAID_flag,          autorequests.append(PartSpec(fstype="swap", size=minswap, maxSize=maxswap, raidLevel=raidLevel,
174                              grow=True, asVol=asVol_flag))                              grow=True, asVol=asVol_flag))
175    
176          storage.autoPartitionRequests = autorequests          storage.autoPartitionRequests = autorequests
# Line 177  class InstallClass(BaseInstallClass): Line 183  class InstallClass(BaseInstallClass):
183                                 anaconda.platform)                                 anaconda.platform)
184    
185      def productMatches(self, oldprod):      def productMatches(self, oldprod):
186            log.info("oldprod %s productName %s" % (oldprod, productName));
187          if oldprod is None:          if oldprod is None:
188              return False              return False
189    
190          if oldprod.startswith(productName):          if oldprod.startswith(productName):
191              return True              return True
192    
193            productUpgrades = {
194                "SME Server": ("Mitel Networks", "SME Server", "e-smith server", ),
195            }
196    
197            if productUpgrades.has_key(productName):
198                acceptable = productUpgrades[productName]
199            else:
200                acceptable = ()
201    
202            for p in acceptable:
203                if oldprod.startswith(p):
204                    return True
205    
206          return False          return False
207    
208        def versionMatches(self, oldver):
209            log.info("oldver %s productVersion %s" % (oldver, productVersion));
210            return True;
211    
212      def getBackend(self):      def getBackend(self):
213          return yuminstall.YumBackend          return yuminstall.YumBackend
214    


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