summaryrefslogtreecommitdiffstats
path: root/milo.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-01-10 20:36:04 +0000
committerMatt Wilson <msw@redhat.com>2000-01-10 20:36:04 +0000
commit5c067a476f22d23406b799e9261c26332220f2c0 (patch)
tree52a84822657803f7bb151a286052b54f67da7000 /milo.py
parent797eb8933d57e9e68be086a611df0377900efdf0 (diff)
downloadanaconda-5c067a476f22d23406b799e9261c26332220f2c0.tar.gz
anaconda-5c067a476f22d23406b799e9261c26332220f2c0.tar.xz
anaconda-5c067a476f22d23406b799e9261c26332220f2c0.zip
Use new fstab functions to set up milo/aboot
use fstab.getRootDevice in lilo setup
Diffstat (limited to 'milo.py')
-rw-r--r--milo.py23
1 files changed, 13 insertions, 10 deletions
diff --git a/milo.py b/milo.py
index 227458803..b61b07223 100644
--- a/milo.py
+++ b/milo.py
@@ -37,11 +37,11 @@ class MiloInstall:
self.todo = todo
def writeAboot (self):
- if self.todo.mounts.has_key ('/boot'):
+ bootDevice = self.todo.fstab.getBootDevice ()
+ rootDevice = self.todo.fstab.getRootDevice ()[0]
+ if bootDevice != rootDevice:
confprefix = self.todo.instPath + "/boot/etc"
kernelprefix = '/'
- partition = partitionNum (self.todo.mounts['/boot'][0])
- abootdev = wholeDevice (self.todo.mounts['/boot'][0])
try:
os.mkdir (confprefix)
except:
@@ -57,27 +57,27 @@ class MiloInstall:
else:
confprefix = self.todo.instPath + "/etc"
kernelprefix = '/boot/'
- partition = partitionNum (self.todo.mounts['/'][0])
- abootdev = wholeDevice (self.todo.mounts['/'][0])
+
+ partition = partitionNum (bootDevice)
+ abootdev = wholeDevice (bootDevice)
if os.access (confprefix + "/aboot.conf", os.R_OK):
os.rename (confprefix + "/aboot.conf",
confprefix + "/aboot.conf.rpmsave")
f = open (confprefix + "/aboot.conf", 'w')
f.write ("# aboot default configurations\n")
- if self.todo.mounts.has_key ('/boot'):
+ if bootDevice != rootDevice:
f.write ("# NOTICE: You have a /boot partition. This means that\n")
f.write ("# all kernel paths are relative to /boot/\n")
lines = 0
- rootdev = self.todo.mounts['/'][0]
for package, tag in (('kernel-smp', 'smp'), ('kernel', '')):
if (self.todo.hdList.has_key(package) and
self.todo.hdList[package].selected):
kernel = self.todo.hdList[package]
version = "%s-%s" % (kernel['version'], kernel['release'])
f.write ("%d:%d%svmlinuz-%s%s root=/dev/%s\n" %
- (lines, partition, kernelprefix, version, tag, rootdev))
+ (lines, partition, kernelprefix, version, tag, rootDevice))
lines = lines + 1
f.close ()
@@ -94,7 +94,10 @@ class MiloInstall:
stdout = None,
root = self.todo.instPath)
def writeMilo (self):
- if self.todo.mounts.has_key ('/boot'):
+ bootDevice = self.todo.fstab.getBootDevice ()
+ rootDevice = self.todo.fstab.getRootDevice ()[0]
+
+ if bootDevice != rootDevice:
hasboot = 1
kernelroot = '/'
try:
@@ -127,7 +130,7 @@ class MiloInstall:
for version, label in kernels:
f.write ("image=%svmlinuz-%s\n" % (kernelroot, version))
f.write ("\tlabel=%s\n" % label)
- f.write ("\troot=/dev/%s" % self.todo.mounts ['/'][0])
+ f.write ("\troot=/dev/%s" % rootDevice)
def write (self):
if onMILO ():