summaryrefslogtreecommitdiffstats
path: root/installclasses
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2006-07-24 20:33:21 +0000
committerJeremy Katz <katzj@redhat.com>2006-07-24 20:33:21 +0000
commitab3431c19b1d3a8d250c8d83331c61174c19f5a4 (patch)
tree1771660d42e7a4bbd9cc38b7040228a24eeb9923 /installclasses
parent252d611ece0a52b58a10c893bd87f557837ea3b6 (diff)
downloadanaconda-ab3431c19b1d3a8d250c8d83331c61174c19f5a4.tar.gz
anaconda-ab3431c19b1d3a8d250c8d83331c61174c19f5a4.tar.xz
anaconda-ab3431c19b1d3a8d250c8d83331c61174c19f5a4.zip
and actually add the file
Diffstat (limited to 'installclasses')
-rw-r--r--installclasses/rhel.py71
1 files changed, 71 insertions, 0 deletions
diff --git a/installclasses/rhel.py b/installclasses/rhel.py
new file mode 100644
index 000000000..c35f20484
--- /dev/null
+++ b/installclasses/rhel.py
@@ -0,0 +1,71 @@
+from installclass import BaseInstallClass
+from rhpl.translate import N_
+from constants import *
+import os
+import iutil
+
+# custom installs are easy :-)
+class InstallClass(BaseInstallClass):
+ # name has underscore used for mnemonics, strip if you dont need it
+ id = "custom"
+ name = N_("Red Hat Enterprise Linux")
+ pixmap = "custom.png"
+ description = N_("Select this installation type to gain complete "
+ "control over the installation process, including "
+ "software package selection and partitioning.")
+ sortPriority = 10000
+ showLoginChoice = 1
+ showMinimal = 1
+ if not productName.startswith("Red Hat Enterprise"):
+ hidden = 1
+ hidden = 0
+
+ tasks = [(N_("Office and Productivity"), ["graphics", "office", "games", "sound-and-video"]),
+ (N_("Software Development"), ["development-libs", "development-tools", "gnome-software-development", "x-software-development"],),
+ (N_("Web server"), ["web-server"])]
+
+ def setInstallData(self, anaconda):
+ BaseInstallClass.setInstallData(self, anaconda)
+ BaseInstallClass.setDefaultPartitioning(self, anaconda.id.partitions,
+ CLEARPART_TYPE_LINUX)
+
+ def setGroupSelection(self, anaconda):
+ grps = anaconda.backend.getDefaultGroups()
+ map(lambda x: anaconda.backend.selectGroup(x), grps)
+
+ def setSteps(self, dispatch):
+ BaseInstallClass.setSteps(self, dispatch);
+ dispatch.skipStep("partition")
+ dispatch.skipStep("regkey", skip = 0)
+
+ # for rhel, we're putting the metadata under productpath
+ def getPackagePaths(self, uri):
+ rc = {}
+ for (name, path) in self.repopaths.items():
+ rc[name] = "%s/%s" %(uri, path)
+ return rc
+
+ def handleRegKey(self, key, intf):
+ if key is None or len(key) == 0:
+ intf.messageWindow(_("Registration Key Required"),
+ _("A registration key is required to "
+ "install %s. Please contact your support "
+ "representative if you did not receive a "
+ "key with your product." %(productName,)),
+ type = "ok", custom_icon="error")
+ raise NoKeyError
+
+ # simple and stupid for now... if C is in the key, add Clustering
+ # if V is in the key, add Virtualization.
+ if key.find("C") != -1:
+ self.repopaths["cluster"] = "Cluster"
+ if key.find("V") != -1:
+ self.repopaths["virt"] = "VT"
+
+ self.regkey = key
+
+ def __init__(self, expert):
+ BaseInstallClass.__init__(self, expert)
+
+ self.repopaths = { "base": "%s" %(productPath,) }
+ self.regkey = None