summaryrefslogtreecommitdiffstats
path: root/todo.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-09-18 20:55:36 +0000
committerMatt Wilson <msw@redhat.com>1999-09-18 20:55:36 +0000
commitc4828d08e63abab4b119b0c54467eb8e7ee7a912 (patch)
tree6824046c68828027198481f7d92bd5872120cdca /todo.py
parent0ae499b5f317bfd837640c65a2ed10374b8e6423 (diff)
downloadanaconda-c4828d08e63abab4b119b0c54467eb8e7ee7a912.tar.gz
anaconda-c4828d08e63abab4b119b0c54467eb8e7ee7a912.tar.xz
anaconda-c4828d08e63abab4b119b0c54467eb8e7ee7a912.zip
copy extra modules properly
Diffstat (limited to 'todo.py')
-rw-r--r--todo.py38
1 files changed, 36 insertions, 2 deletions
diff --git a/todo.py b/todo.py
index 53002b0de..760220e0e 100644
--- a/todo.py
+++ b/todo.py
@@ -315,7 +315,7 @@ class Drives:
class ToDo:
def __init__(self, intf, method, rootPath, setupFilesystems = 1,
installSystem = 1, mouse = None, instClass = None, x = None,
- expert = 0):
+ expert = 0, extraModules = []):
self.intf = intf
self.method = method
self.mounts = {}
@@ -327,6 +327,7 @@ class ToDo:
self.language = Language ()
self.network = Network ()
self.rootpassword = Password ()
+ self.extraModules = extraModules
if mouse:
self.mouse = Mouse (xmouseType = mouse)
else:
@@ -1180,12 +1181,44 @@ class ToDo:
elif (what == rpm.RPMCALLBACK_INST_PROGRESS):
intf.setPackageScale(amount, total)
elif (what == rpm.RPMCALLBACK_INST_CLOSE_FILE):
- (h, self) = key
os.close (self.rpmFD)
intf.completePackage(h)
else:
pass
+ def copyExtraModules(self):
+ kernelVersions = []
+
+ if (self.hdList.has_key('kernel-smp') and
+ self.hdList['kernel-smp'].selected):
+ version = (self.hdList['kernel-smp']['version'] + "-" +
+ self.hdList['kernel-smp']['release'] + "smp")
+ kernelVersions.append(version)
+
+ version = (self.hdList['kernel']['version'] + "-" +
+ self.hdList['kernel']['release'])
+ kernelVersions.append(version)
+
+ for (path, subdir, name) in self.extraModules:
+ pattern = ""
+ names = ""
+ for n in kernelVersions:
+ pattern = pattern + " " + n + "/" + name + ".o"
+ names = names + " " + name + ".o"
+ command = ("cd %s/lib/modules; gunzip < %s/modules.cgz | " +
+ "%s/bin/cpio --quiet -iumd %s") % \
+ (self.instPath, path, self.instPath, pattern)
+ self.log("running: '%s'\n" % (command, ))
+ os.system(command)
+
+ for n in kernelVersions:
+ self.log("from %s/lib/modules/%s/%s.o\n" % (self.instPath, n, name))
+ self.log("to %s/lib/modules/%s/%s/%s.o" % (self.instPath, n,
+ subdir, name))
+ os.rename("%s/lib/modules/%s/%s.o" % (self.instPath, n, name),
+ "%s/lib/modules/%s/%s/%s.o" % (self.instPath, n,
+ subdir, name))
+
def doInstall(self):
# make sure we have the header list and comps file
self.getHeaderList()
@@ -1324,6 +1357,7 @@ class ToDo:
if not self.upgrade:
self.createCdrom()
+ self.copyExtraModules()
self.writeFstab ()
self.writeLanguage ()
self.writeMouse ()