diff options
author | Jeremy Katz <katzj@redhat.com> | 2004-04-20 20:11:48 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2004-04-20 20:11:48 +0000 |
commit | a6e994717a307ae366dec696ef8d415953a437c7 (patch) | |
tree | 3d350fbd74796357b8aab5f6acc5d8e496adae97 /packages.py | |
parent | 87b0928251d0141332614c4c6a3cd8a85ff39614 (diff) | |
download | anaconda-a6e994717a307ae366dec696ef8d415953a437c7.tar.gz anaconda-a6e994717a307ae366dec696ef8d415953a437c7.tar.xz anaconda-a6e994717a307ae366dec696ef8d415953a437c7.zip |
during installs of fc1, modutils generated a (broken) modprobe.conf. when
you then go to 2.6, things go Bad (tm). let's remove that if we have both
a modules.conf and modprobe.conf (thus, we were upgrading from a 2.4 release)
and then move the old modules.conf out of the way so we don't trigger this
on future releases
Diffstat (limited to 'packages.py')
-rw-r--r-- | packages.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages.py b/packages.py index c1f2b36cd..b8381ba80 100644 --- a/packages.py +++ b/packages.py @@ -682,6 +682,16 @@ def doPreInstall(method, id, intf, instPath, dir): f = open(instPath + "/etc/mtab", "w+") f.close() + # we really started writing modprobe.conf out before things were + # all completely ready. so now we need to nuke old modprobe.conf's + # if you're upgrading from a 2.4 dist so that we can get the + # transition right + if (os.path.exists(instPath + "/etc/modules.conf") and + os.path.exists(instPath + "/etc/modprobe.conf")): + log("renaming old modprobe.conf -> modprobe.conf.anacbak") + os.rename(instPath + "/etc/modprobe.conf", + instPath + "/etc/modprobe.conf.anacbak") + if method.systemMounted (id.fsset, instPath): id.fsset.umountFilesystems(instPath) return DISPATCH_BACK @@ -1141,6 +1151,14 @@ def doPostInstall(method, id, intf, instPath): # of working afterwards. FIXME: this is a hack migrateMouseConfig(instPath, instLogName) + # bye-bye to old modules.conf (see above comment wrt modprobe.conf) + if (os.path.exists(instPath + "/etc/modules.conf") and + os.path.exists(instPath + "/etc/modprobe.conf")): + log("renaming old modules.conf -> modprobe.conf.pre26") + os.rename(instPath + "/etc/modules.conf", + instPath + "/etc/modules.conf.pre26") + + w.set(5) # FIXME: hack to install the comps package |