summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-07-17 22:33:36 +0000
committerJeremy Katz <katzj@redhat.com>2001-07-17 22:33:36 +0000
commit282fc8ca5be92c7a8c99ae042e8ccfa7e75bfa17 (patch)
tree0f248e04d6304b005d804e674fd7fab7afc0107c /kickstart.py
parentd49a73331b92472951186b5a066653254e79a696 (diff)
downloadanaconda-282fc8ca5be92c7a8c99ae042e8ccfa7e75bfa17.tar.gz
anaconda-282fc8ca5be92c7a8c99ae042e8ccfa7e75bfa17.tar.xz
anaconda-282fc8ca5be92c7a8c99ae042e8ccfa7e75bfa17.zip
use the bootloader code for lilo since it's all there...
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py49
1 files changed, 9 insertions, 40 deletions
diff --git a/kickstart.py b/kickstart.py
index 2b4af2b85..4b241bf24 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -205,7 +205,7 @@ class KickstartBase(BaseInstallClass):
self.skipSteps.append("authentication")
- def doBootloader (self, id, args):
+ def doBootloader (self, id, args, useLilo = 0):
(args, extra) = isys.getopt(args, '',
[ 'append=', 'location=', 'useLilo', '--lba32',
'password=', 'md5pass=', 'linear', 'nolinear'])
@@ -213,7 +213,6 @@ class KickstartBase(BaseInstallClass):
validLocations = [ "mbr", "partition", "none" ]
appendLine = None
location = "mbr"
- useLilo = 0
password = None
md5pass = None
forceLBA = 0
@@ -225,19 +224,18 @@ class KickstartBase(BaseInstallClass):
appendLine = arg
elif str == '--location':
location = arg
- # XXX need this to do something
elif str == '--useLilo':
useLilo = 1
+ elif str == '--linear':
+ linear = 1
+ elif str == '--nolinear':
+ linear = 0
elif str == '--lba32':
forceLBA = 1
elif str == '--password':
password = arg
elif str == '--md5pass':
md5pass = arg
- elif str == '--linear':
- linear = 1
- elif str == '--nolinear':
- linear = 0
if location not in validLocations:
raise ValueError, "mbr, partition, or none expected for bootloader command"
@@ -246,43 +244,14 @@ class KickstartBase(BaseInstallClass):
else:
location = validLocations.index(location)
- self.setBootloader(id, useLilo, location, forceLBA, password, md5pass, appendLine)
+ self.setBootloader(id, useLilo, location, linear, forceLBA,
+ password, md5pass, appendLine)
self.skipSteps.append("bootloader")
self.skipSteps.append("bootloaderpassword")
def doLilo (self, id, args):
- (args, extra) = isys.getopt(args, '',
- [ 'append=', 'location=', 'linear', 'nolinear', 'lba32' ])
-
- appendLine = None
- location = "mbr"
- linear = 1
- forceLBA = 0
-
- for n in args:
- (str, arg) = n
- if str == '--append':
- appendLine = arg
- elif str == '--linear':
- linear = 1
- elif str == '--nolinear':
- linear = 0
- elif str == '--lba32':
- forceLBA = 1
- elif str == '--location':
- # XXX this doesn't really do anything right now
- if arg == 'mbr' or arg == 'partition':
- location = arg
- elif arg == 'none':
- location = None
- else:
- raise ValueError, ("mbr, partition or none expected for "+
- "lilo command")
-
- self.setLiloInformation(id, location, linear, forceLBA, appendLine)
- self.skipSteps.append("bootloader")
- self.skipSteps.append("bootloaderpassword")
-
+ self.doBootloader(id, args, useLilo = 1)
+
def doLiloCheck (self, args):
drives = isys.hardDriveDict ().keys()
drives.sort(isys.compareDrives)