summaryrefslogtreecommitdiffstats
path: root/packages.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-05-18 03:45:34 +0000
committerJeremy Katz <katzj@redhat.com>2004-05-18 03:45:34 +0000
commit3105f614b92cebd202d473d980326f534d2f0c02 (patch)
tree98c6e0a7a67b4934fc5f95c4257e0eb5d8bc5e7f /packages.py
parent5a6253f78f105e543f2d6d831feb5883588ecb58 (diff)
downloadanaconda-3105f614b92cebd202d473d980326f534d2f0c02.tar.gz
anaconda-3105f614b92cebd202d473d980326f534d2f0c02.tar.xz
anaconda-3105f614b92cebd202d473d980326f534d2f0c02.zip
merge anaconda-10_0-branch changes back to HEAD
Diffstat (limited to 'packages.py')
-rw-r--r--packages.py29
1 files changed, 8 insertions, 21 deletions
diff --git a/packages.py b/packages.py
index b6af4d243..beaacb320 100644
--- a/packages.py
+++ b/packages.py
@@ -691,10 +691,12 @@ def doPreInstall(method, id, intf, instPath, dir):
# 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")):
+ os.path.exists(instPath + "/etc/modprobe.conf") and
+ not os.path.exists(instPath + "/etc/modprobe.conf.anacbak")):
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)
@@ -748,20 +750,16 @@ def doPreInstall(method, id, intf, instPath, dir):
# write out the fstab
if not upgrade:
id.fsset.write(instPath)
-
- # rootpath mode doesn't have this file around
- # we need this on upgrades now that we move the old modprobe.conf
- # out of the way and let kudzu regen stuff. otherwise, initrds
- # won't end up being right
- if os.access("/tmp/modprobe.conf", os.R_OK):
- iutil.copyFile("/tmp/modprobe.conf",
- instPath + "/etc/modprobe.conf")
+ # rootpath mode doesn't have this file around
+ if os.access("/tmp/modprobe.conf", os.R_OK):
+ iutil.copyFile("/tmp/modprobe.conf",
+ instPath + "/etc/modprobe.conf")
# make a /etc/mtab so mkinitrd can handle certain hw (usb) correctly
f = open(instPath + "/etc/mtab", "w+")
f.write(id.fsset.mtab())
f.close()
-
+
# delay writing migrate adjusted fstab till later, in case
# rpm transaction set determines they don't have enough space to upgrade
# else:
@@ -1075,9 +1073,6 @@ def doPostInstall(method, id, intf, instPath):
w.set(3)
- # we need to run kudzu on upgrades now so that modprobe.conf
- # gets generated right
- if 1:
# blah. If we're on a serial mouse, and we have X, we need to
# close the mouse device, then run kudzu, then open it again.
@@ -1173,14 +1168,6 @@ 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