summaryrefslogtreecommitdiffstats
path: root/packages.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2006-05-17 19:43:14 +0000
committerChris Lumens <clumens@redhat.com>2006-05-17 19:43:14 +0000
commit05f798221952d905193a7c9299763ddb9d0409e5 (patch)
tree3ce6f6b7db55a0e85d622609b07ad2bce8a96de2 /packages.py
parent5f5e54c009a694d1b4c0d24ab5a98f75b73a6c9e (diff)
downloadanaconda-05f798221952d905193a7c9299763ddb9d0409e5.tar.gz
anaconda-05f798221952d905193a7c9299763ddb9d0409e5.tar.xz
anaconda-05f798221952d905193a7c9299763ddb9d0409e5.zip
Hook copyExtraModules back up to copy updated modules to the installed
system after installation (#185344).
Diffstat (limited to 'packages.py')
-rw-r--r--packages.py67
1 files changed, 0 insertions, 67 deletions
diff --git a/packages.py b/packages.py
index bd4897ffe..6b0173601 100644
--- a/packages.py
+++ b/packages.py
@@ -260,73 +260,6 @@ def migrateXinetd(instPath, instLog):
stdout = logfile, stderr = logfile)
os.close(logfile)
-def copyExtraModules(instPath, grpset, extraModules):
- kernelVersions = grpset.kernelVersionList()
- foundModule = 0
-
- try:
- f = open("/etc/arch")
- arch = f.readline().strip()
- del f
- except IOError:
- arch = os.uname()[2]
-
- for (path, name) in extraModules:
- if not path:
- path = "/modules.cgz"
- pattern = ""
- names = ""
- for (n, tag) in kernelVersions:
- if tag == "up":
- pkg = "kernel"
- else:
- pkg = "kernel-%s" %(tag,)
- arch = grpset.hdrlist[pkg]['arch']
- # version 1 path
- pattern = pattern + " %s/%s/%s.ko " % (n, arch, name)
- # version 0 path
- pattern = pattern + " %s/%s.ko " % (n, name)
- names = names + " %s.ko" % (name,)
- command = ("cd %s/lib/modules; gunzip < %s | "
- "%s/bin/cpio --quiet -iumd %s" %
- (instPath, path, instPath, pattern))
- log.info("running: '%s'" % (command, ))
- os.system(command)
-
- for (n, tag) in kernelVersions:
- if tag == "up":
- pkg = "kernel"
- else:
- pkg = "kernel-%s" %(tag,)
-
- toDir = "%s/lib/modules/%s/updates" % \
- (instPath, n)
- to = "%s/%s.ko" % (toDir, name)
-
- if (os.path.isdir("%s/lib/modules/%s" %(instPath, n)) and not
- os.path.isdir("%s/lib/modules/%s/updates" %(instPath, n))):
- os.mkdir("%s/lib/modules/%s/updates" %(instPath, n))
- if not os.path.isdir(toDir):
- continue
-
- arch = grpset.hdrlist[pkg]['arch']
- for p in ("%s/%s.ko" %(arch, name), "%s.ko" %(name,)):
- fromFile = "%s/lib/modules/%s/%s" % (instPath, n, p)
-
- if (os.access(fromFile, os.R_OK)):
- log.info("moving %s to %s" % (fromFile, to))
- os.rename(fromFile, to)
- # the file might not have been owned by root in the cgz
- os.chown(to, 0, 0)
- foundModule = 1
- else:
- log.warning("missing DD module %s (this may be okay)" %
- fromFile)
-
- if foundModule == 1:
- for (n, tag) in kernelVersions:
- recreateInitrd(n, instPath)
-
#Recreate initrd for use when driver disks add modules
def recreateInitrd (kernelTag, instRoot):