summaryrefslogtreecommitdiffstats
path: root/silo.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-02-05 20:25:21 +0000
committerMatt Wilson <msw@redhat.com>2000-02-05 20:25:21 +0000
commit6e55a6b4d70e5ca604ebe644d08cf8e129ef916c (patch)
tree179b27434ec0ec9e2c4dc8d610e2c07719381d25 /silo.py
parentd79ce7d29b31242bc89b255ecdebd524b899dad3 (diff)
downloadanaconda-6e55a6b4d70e5ca604ebe644d08cf8e129ef916c.tar.gz
anaconda-6e55a6b4d70e5ca604ebe644d08cf8e129ef916c.tar.xz
anaconda-6e55a6b4d70e5ca604ebe644d08cf8e129ef916c.zip
move makeinitrd here.
Diffstat (limited to 'silo.py')
-rw-r--r--silo.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/silo.py b/silo.py
index 9366f2078..bdc32b9ee 100644
--- a/silo.py
+++ b/silo.py
@@ -177,6 +177,19 @@ class SiloInstall:
def disk2PromPath(self,dev):
return _silo.disk2PromPath(dev)
+ def makeInitrd (self, kernelTag, instRoot):
+ initrd = "/boot/initrd%s.img" % (kernelTag, )
+ if not self.initrdsMade.has_key(initrd):
+ iutil.execWithRedirect("/sbin/mkinitrd",
+ [ "/sbin/mkinitrd",
+ "--ifneeded",
+ initrd,
+ kernelTag[1:] ],
+ stdout = None, stderr = None, searchPath = 1,
+ root = instRoot)
+ self.initrdsMade[kernelTag] = 1
+ return initrd
+
def install(self, fstab, instRoot, hdList, upgrade):
silo = LiloConfigFile ()
@@ -259,7 +272,7 @@ class SiloInstall:
for (label, kernel, tag) in kernelList:
kernelTag = "-%s-%s%s" % (kernel['version'], kernel['release'], tag)
- initrd = todo.makeInitrd (kernelTag)
+ initrd = self.makeInitrd (kernelTag, instRoot)
if rootDev == bootpart:
kernelFile = "/boot/vmlinuz" + kernelTag
initrdFile = initrd