summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-09-01 17:50:13 +0000
committerMatt Wilson <msw@redhat.com>1999-09-01 17:50:13 +0000
commitd51302135cb4649b084dcf85f8d6984f76d51ae8 (patch)
tree0a8a70fd346f361e709a866d0798957ddb5475a4
parent79e681f0f100f23c368a922184a86918f246ad8c (diff)
downloadanaconda-d51302135cb4649b084dcf85f8d6984f76d51ae8.tar.gz
anaconda-d51302135cb4649b084dcf85f8d6984f76d51ae8.tar.xz
anaconda-d51302135cb4649b084dcf85f8d6984f76d51ae8.zip
initial attempt at implementing clearpart
-rw-r--r--installclass.py10
-rw-r--r--kickstart.py10
2 files changed, 19 insertions, 1 deletions
diff --git a/installclass.py b/installclass.py
index 089066ed1..8d01b99a1 100644
--- a/installclass.py
+++ b/installclass.py
@@ -4,6 +4,10 @@
# The interface to InstallClass is *public* -- ISVs/OEMs can customize the
# install by creating a new derived type of this class.
+FSEDIT_CLEAR_LINUX = (1 << 0)
+FSEDIT_CLEAR_ALL = (1 << 2)
+FSEDIT_USE_EXISTING = (1 << 3)
+
class InstallClass:
# ummm, HACK
@@ -23,7 +27,7 @@ class InstallClass:
attempt.append((mntpoint, size, type, grow, -1))
try:
- ddruid.attempt (attempt, "Junk Argument", 0)
+ ddruid.attempt (attempt, "Junk Argument", self.createParts)
return 1
except:
# life's a female dog <shrug> -- we should log something though
@@ -43,6 +47,9 @@ class InstallClass:
self.lilo = (location, linear, appendLine)
+ def setClearPart(self, clear):
+ self.clearPart = clear
+
def getLiloInformation(self):
return self.lilo
@@ -122,6 +129,7 @@ class InstallClass:
self.nameserver = ""
self.partitions = []
self.skipPartitioning = 0
+ self.clearPart = 0
# custom installs are easy :-)
class CustomInstall(InstallClass):
diff --git a/kickstart.py b/kickstart.py
index 7e5ea5907..d9ff60e0b 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -1,5 +1,7 @@
import isys
from installclass import InstallClass
+from installclass import FSEDIT_CLEAR_LINUX
+from installclass import FSEDIT_CLEAR_ALL
import getopt
import sys
@@ -121,6 +123,7 @@ class Kickstart(InstallClass):
handlers = {
"authconfig" : self.doAuthconfig ,
"cdrom" : None ,
+ "clearpart" : self.doClearPart ,
"install" : self.doInstall ,
"network" : self.doNetwork ,
"lilo" : self.doLilo ,
@@ -142,6 +145,13 @@ class Kickstart(InstallClass):
cmd = args[0]
if handlers[cmd]: handlers[cmd](args[1:])
+ def doClearPart(self, args):
+ if args[0] == '--linux'
+ clear = FSEDIT_CLEAR_LINUX
+ elif args[0] == '--all'
+ clear = FSEDIT_CLEAR_ALL
+ self.setClearPart(clear)
+
def definePartition(self, args):
# we just set up the desired partitions -- magic in our base class
# does the actual partitioning (no, you don't want to know the