summaryrefslogtreecommitdiffstats
path: root/installclasses/custom.py
blob: c35b01b29c14aee2bccc0fdca22860d683e24434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from installclass import BaseInstallClass
from installclass import FSEDIT_CLEAR_LINUX
from translate import N_
import os
import iutil

# custom installs are easy :-)
class InstallClass(BaseInstallClass):

    name = N_("Custom System")
    pixmap = "custom.png"
    
    sortPriority = 10000

    def __init__(self, expert):
	BaseInstallClass.__init__(self)

	if os.uname ()[4] != 'sparc64':
	    self.addNewPartition('/boot', (48, -1, 0), (None,-1,0), (0,0))
	self.addNewPartition('/', (700, -1, 1), (None, -1, 0), (0,0))
	self.setClearParts(FSEDIT_CLEAR_LINUX, 
	    warningText = N_("Automatic partitioning will erase any preexisting Linux "
			     "installations on your system."))

        # 2.4 kernel requires more swap, so base amount we try to get
        # on amount of memory
        (minswap, maxswap) = iutil.swapSuggestion()
	self.addNewPartition('swap', (minswap, maxswap, 1), (None, -1, 0), (0,0))