diff options
author | Erik Troan <ewt@redhat.com> | 2001-06-20 01:46:34 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2001-06-20 01:46:34 +0000 |
commit | d2b85ad932ca315f00ca72527e87ea9a059f74e6 (patch) | |
tree | 3bc31ce8d092457372b4cd1b1bad60b45dad0b32 /installclasses | |
parent | 1a690b55258ae286bee27e4d1db22c527862837b (diff) | |
download | anaconda-d2b85ad932ca315f00ca72527e87ea9a059f74e6.tar.gz anaconda-d2b85ad932ca315f00ca72527e87ea9a059f74e6.tar.xz anaconda-d2b85ad932ca315f00ca72527e87ea9a059f74e6.zip |
merge from (now defunct) dispatch branch
Diffstat (limited to 'installclasses')
-rw-r--r-- | installclasses/custom.py | 18 | ||||
-rw-r--r-- | installclasses/laptop.py | 6 | ||||
-rw-r--r-- | installclasses/reconfig.py | 52 | ||||
-rw-r--r-- | installclasses/server.py | 59 | ||||
-rw-r--r-- | installclasses/upgradeclass.py | 41 | ||||
-rw-r--r-- | installclasses/upgradeonly.py | 24 | ||||
-rw-r--r-- | installclasses/workstation.py | 48 |
7 files changed, 160 insertions, 88 deletions
diff --git a/installclasses/custom.py b/installclasses/custom.py index c35b01b29..9691cc688 100644 --- a/installclasses/custom.py +++ b/installclasses/custom.py @@ -12,22 +12,4 @@ class InstallClass(BaseInstallClass): 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)) - - - - diff --git a/installclasses/laptop.py b/installclasses/laptop.py index 9ff1c428b..4074f86ea 100644 --- a/installclasses/laptop.py +++ b/installclasses/laptop.py @@ -10,10 +10,12 @@ class InstallClass(workstation.InstallClass): sortPriority = 5000 arch = 'i386' + def setGroupSelection(self, comps): + workstation.InstallClass.__init__(self, comps) + comps["Laptop Support"].select() + if pcmcia.pcicType(): default = 1 def __init__(self, expert): workstation.InstallClass.__init__(self, expert) - # XXX better interface for manipulating this stuff? - self.groups.append("Laptop Support") diff --git a/installclasses/reconfig.py b/installclasses/reconfig.py new file mode 100644 index 000000000..bc6614f57 --- /dev/null +++ b/installclasses/reconfig.py @@ -0,0 +1,52 @@ +from installclass import BaseInstallClass +from instdata import InstallData +from translate import N_ +from translate import _ +import os +import iutil + +class ReconfigInstallData(InstallData): + + def write(self, instPath): + self.langSupport.write (instPath) + self.keyboard.write (instPath) + self.network.write (instPath) + self.auth.write (instPath) + self.firewall.write (instPath) + self.timezone.write (instPath) + self.rootPassword.write (instPath, self.auth) + self.accounts.write (instPath, self.auth) + + def writeKS(self, file): + pass + +class InstallClass(BaseInstallClass): + name = "reconfig" + pixmap = None + sortPriority = 999999 + hidden = 1 + + parentClass = None + + def setSteps(self, dispatch): + dispatch.setStepList( + "reconfigwelcome", + "reconfigkeyboard", + "network", + "firewall", + "languagesupport", + "timezone", + "accounts", + "authentication", + "writeconfig", + "reconfigcomplete" + ) + + installDataClass = ReconfigInstallData + + def __init__(self, expert): + BaseInstallClass.__init__(self, expert) + + if (iutil.getDefaultRunlevel() != '5' or + not os.access("/etc/X11/XF86Config", os.R_OK)): + forceTextMode = 1 diff --git a/installclasses/server.py b/installclasses/server.py index 49aa08b1a..c0411fe7f 100644 --- a/installclasses/server.py +++ b/installclasses/server.py @@ -10,37 +10,36 @@ class InstallClass(BaseInstallClass): pixmap = "server.png" sortPriority = 10 - def __init__(self, expert): - BaseInstallClass.__init__(self) - self.setGroups(["Server"]) - self.setHostname("localhost.localdomain") - if not expert: - self.addToSkipList("lilo") - self.addToSkipList("authentication") - self.setMakeBootdisk(1) - - self.showgroups = [ "KDE", - (0, "GNOME"), - (0, "X Window System"), + def setSteps(self, dispatch): + BaseInstallClass.setSteps(self, dispatch); + + if self.skipLilo: + dispatch.skipStep("bootloader") + dispatch.skipStep("authentication") + dispatch.skipStep("bootdisk", skip = 0) + + def setGroupSelection(self, comps): + BaseInstallClass.__init__(self, comps) + self.showGroups(comps, + [ "KDE", + ("GNOME", 0), + ("X Window System", 0), "News Server", "NFS Server", "Web Server", "SMB (Samba) Server", - "DNS Name Server" ] - - if os.uname ()[4] != 'sparc64': - self.addNewPartition('/boot', (48, -1, 0), (None, -1, 0), (0,0)) - self.addNewPartition('/', (256, -1, 0), (None, -1, 0), (0,0)) - self.addNewPartition('/usr', (512, -1, 1), (None, -1, 0), (0,0)) - self.addNewPartition('/var', (256, -1, 0), (None, -1, 0), (0,0)) - self.addNewPartition('/home',(512, -1, 1), (None, -1, 0), (0,0)) - self.setClearParts(FSEDIT_CLEAR_ALL, - warningText = N_("Automatic partitioning will erase ALL DATA on your hard " - "drive to make room for your Linux installation.")) - -# self.addNewPartition('swap', (64, 256, 1), (None, -1, 0), (0,0)) - - # 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)) + "DNS Name Server" ]) + comps["Server"].select() + + def setInstallData(self, id): + BaseInstallClass.setInstallData(self, id) + self.setHostname(id, "localhost.localdomain") + + def __init__(self, expert): + BaseInstallClass.__init__(self, expert) + + if expert: + self.skipLilo = 1 + else: + self.skipLilo = 0 + diff --git a/installclasses/upgradeclass.py b/installclasses/upgradeclass.py new file mode 100644 index 000000000..d7081dfb4 --- /dev/null +++ b/installclasses/upgradeclass.py @@ -0,0 +1,41 @@ +from installclass import BaseInstallClass +from translate import N_ +from translate import _ +import os +import iutil + +class InstallClass(BaseInstallClass): + name = N_("Upgrade Existing System") + pixmap = "upgrade.png" + sortPriority = 999999 + + parentClass = ( _("Upgrade"), "upgrade.png" ) + + def requiredDisplayMode(self): + return 't' + + def setSteps(self, dispatch): + dispatch.setStepList( + "language", + "keyboard", + "mouse", + "welcome", + "installtype", + "custom-upgrade", + "addswap", + "upgradecontinue", + "indivpackage", + "bootloader", + "dependencies", + "monitor", + "confirminstall", + "install", + "bootdisk", + "complete" + ) + + if iutil.getArch() == "alpha" or iutil.getArch() == "ia64": + dispatch.skipStep("bootdisk") + + def __init__(self, expert): + BaseInstallClass.__init__(self, expert) diff --git a/installclasses/upgradeonly.py b/installclasses/upgradeonly.py index 1fc6e1c2c..7eee77a49 100644 --- a/installclasses/upgradeonly.py +++ b/installclasses/upgradeonly.py @@ -8,23 +8,21 @@ class InstallClass(BaseInstallClass): hidden = 1 sortPriority = 1 - def requiredDisplayMode(self): return 't' + + def setSteps(self, dispatch): + dispatch.setStepList( + "mouse", + "installtype", + "addswap", + "dependencies", + "monitor", + "install", + "complete" + ) def __init__(self, expert): BaseInstallClass.__init__(self) self.installType = "upgrade" - - self.addToSkipList("bootdisk") - self.addToSkipList("language") - self.addToSkipList("languagesupport") - self.addToSkipList("languagedefault") - self.addToSkipList("keyboard") - self.addToSkipList("welcome") - self.addToSkipList("package-selection") - self.addToSkipList("lilo") - self.addToSkipList("confirm-upgrade") - self.addToSkipList("custom-upgrade") - self.addToSkipList("network") diff --git a/installclasses/workstation.py b/installclasses/workstation.py index d7bbe966e..92b6fda5c 100644 --- a/installclasses/workstation.py +++ b/installclasses/workstation.py @@ -10,29 +10,27 @@ class InstallClass(BaseInstallClass): sortPriority = 1 + def setSteps(self, dispatch): + BaseInstallClass.setSteps(self, dispatch); + + if self.skipLilo: + dispatch.skipStep("bootloader") + + dispatch.skipStep("authentication") + dispatch.skipStep("bootdisk", skip = 0) + + def setGroupSelection(self, comps): + BaseInstallClass.__init__(self, comps) + self.showGroups(comps, [ "KDE", ("GNOME", 1), "Games" ] ) + + def setInstallData(self, id): + BaseInstallClass.setInstallData(self, id) + self.setHostname(id, "localhost.localdomain") + def __init__(self, expert): - BaseInstallClass.__init__(self) - self.setGroups(["Workstation Common"]) - self.setHostname("localhost.localdomain") - if not expert: - self.addToSkipList("lilo") - self.addToSkipList("authentication") - self.setMakeBootdisk(1) - - self.showgroups = [ "KDE", - (1, "GNOME"), - "Games" ] - - if os.uname ()[4] != 'sparc64': - self.addNewPartition('/boot', (48, -1, 0), (None,-1,0), (0,0)) - self.addNewPartition('/', (1100, -1, 1), (None, -1, 0), (0,0)) - self.setClearParts(FSEDIT_CLEAR_LINUX, -# warningText = N_("You are about to erase any preexisting Linux " -# "installations on your system.")) - 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)) + BaseInstallClass.__init__(self, expert) + + if expert: + self.skipLilo = 1 + else: + self.skipLilo = 0 |