summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-06-19 16:55:30 +0000
committerMatt Wilson <msw@redhat.com>2000-06-19 16:55:30 +0000
commit2ad82c650cf3f931981c5dd005323e75387e01bb (patch)
tree32ff93f42ef76f4d3c6da08b8ef2a71930b8d0ea
parent1bc9b92471f941388f10f2703868ff816073f9df (diff)
downloadanaconda-2ad82c650cf3f931981c5dd005323e75387e01bb.tar.gz
anaconda-2ad82c650cf3f931981c5dd005323e75387e01bb.tar.xz
anaconda-2ad82c650cf3f931981c5dd005323e75387e01bb.zip
first pass at silo change
-rw-r--r--silo.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/silo.py b/silo.py
index 815bde750..6264140b1 100644
--- a/silo.py
+++ b/silo.py
@@ -264,7 +264,7 @@ class SiloInstall:
i = len (bootpart) - 1
while i > 0 and bootpart[i] in string.digits:
i = i - 1
- silo.addEntry("partition", bootpart[i+1:])
+ silo.addEntry("partition", bootpart[i+1:])
silo.addEntry("timeout", "50")
silo.addEntry("root", '/dev/' + rootDev)
@@ -314,7 +314,11 @@ class SiloInstall:
kernelFile = "/vmlinuz" + kernelTag
initrdFile = initrd[5:]
- sl = LiloConfigFile()
+ try:
+ (fsType, sl) = lilo.getImage(label)
+ lilo.delImage(label)
+ except IndexError, msg:
+ sl = LiloConfigFile(imageType = "image", path = kernelFile)
sl.addEntry("label", label)
if os.access (instRoot + initrd, os.R_OK):
@@ -326,9 +330,13 @@ class SiloInstall:
silo.addImage ("image", kernelFile, sl)
for (label, device) in otherList:
- sl = LiloConfigFile()
+ try:
+ (fsType, sl) = silo.getImage(label)
+ silo.delImage(label)
+ except IndexError:
+ sl = LiloConfigFile(imageType = "other", path = device)
sl.addEntry("label", label)
- silo.addImage ("other", device, sl)
+ lilo.addImage (sl)
# for (siloType, name, config) in silo.images:
# # remove entries for missing kernels (upgrade)