summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-07-09 23:35:14 +0000
committerJeremy Katz <katzj@redhat.com>2001-07-09 23:35:14 +0000
commit08b32cdf09c480e544bffeb56a8667766c218d97 (patch)
tree803cafb0da480d79aa698b79e04434ff64447856
parent00679f23c36200a9f10ec9118141c8a7d7e164c9 (diff)
downloadanaconda-08b32cdf09c480e544bffeb56a8667766c218d97.tar.gz
anaconda-08b32cdf09c480e544bffeb56a8667766c218d97.tar.xz
anaconda-08b32cdf09c480e544bffeb56a8667766c218d97.zip
split install step into three separate steps, doPreInstall, doInstall,
and doPostInstall write out fstab at the end of doPreInstall
-rw-r--r--dispatch.py3
-rw-r--r--installclass.py2
-rw-r--r--installclasses/upgradeclass.py2
-rw-r--r--packages.py19
-rw-r--r--upgradeclass.py2
5 files changed, 27 insertions, 1 deletions
diff --git a/dispatch.py b/dispatch.py
index 9af6dbc07..2f810cd6e 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -20,6 +20,7 @@ from packages import readPackages, checkDependencies, doInstall
from packages import handleX11Packages, writeConfiguration, writeXConfiguration
from packages import writeKSConfiguration, turnOnFilesystems
from packages import queryUpgradeContinue
+from packages import doPreInstall, doPostInstall
from autopart import doAutoPartition
from partitioning import partitionMethodSetup, partitionObjectsInitialize
from partitioning import partitioningComplete
@@ -95,7 +96,9 @@ installSteps = [
( "enablefilesystems", turnOnFilesystems, ( "dir", "id.fsset",
"id.diskset", "id.upgrade",
"instPath") ),
+ ( "preinstallconfig", doPreInstall, ("method", "id", "intf", "instPath", "dir")),
( "installpackages", doInstall, ( "method", "id", "intf", "instPath" )),
+ ( "postinstallconfig", doPostInstall, ("method", "id", "intf", "instPath")),
( "writeconfig", writeConfiguration, ("id", "instPath" )),
( "instbootloader", writeBootloader, ("intf", "instPath", "id.fsset",
"id.bootloader", "id.langSupport",
diff --git a/installclass.py b/installclass.py
index 548231dc0..ac8647be3 100644
--- a/installclass.py
+++ b/installclass.py
@@ -95,7 +95,9 @@ class BaseInstallClass:
"confirminstall",
"enablefilesystems",
"install",
+ "preinstallconfig",
"installpackages",
+ "postinstallconfig",
"writeconfig",
"instbootloader",
"writexconfig",
diff --git a/installclasses/upgradeclass.py b/installclasses/upgradeclass.py
index f4650e53c..ca2c6a338 100644
--- a/installclasses/upgradeclass.py
+++ b/installclasses/upgradeclass.py
@@ -38,7 +38,9 @@ class InstallClass(BaseInstallClass):
"monitor",
"confirmupgrade",
"install",
+ "preinstallconfig",
"installpackages",
+ "postinstallconfig",
"instbootloader",
"bootdisk",
"complete"
diff --git a/packages.py b/packages.py
index 37223db87..850d76d4e 100644
--- a/packages.py
+++ b/packages.py
@@ -308,10 +308,13 @@ def turnOnFilesystems(dir, thefsset, diskset, upgrade, instPath):
thefsset.makeFilesystems (instPath)
thefsset.mountFilesystems (instPath)
-def doInstall(method, id, intf, instPath):
+def doPreInstall(method, id, intf, instPath, dir):
if flags.test:
return
+ if dir == DISPATCH_BACK:
+ return
+
arch = iutil.getArch ()
if arch == "alpha":
@@ -400,6 +403,14 @@ def doInstall(method, id, intf, instPath):
# "%s" % (i, msg))
pass
+ # write out the fstab
+ id.fsset.write(instPath)
+
+def doInstall(method, id, intf, instPath):
+ if flags.test:
+ return
+
+ upgrade = id.upgrade.get()
db = rpm.opendb(1, instPath)
ts = rpm.TransactionSet(instPath, db)
@@ -574,11 +585,17 @@ def doInstall(method, id, intf, instPath):
id.instProgress = None
+def doPostInstall(method, id, intf, instPath):
+ if flags.test:
+ return
+
createWindow = (intf.progressWindow,
(_("Post Install"),
_("Performing post install configuration..."), 8))
w = apply(apply, createWindow)
+ upgrade = id.upgrade.get()
+ arch = iutil.getArch ()
try:
if not upgrade:
# XXX should this go here?
diff --git a/upgradeclass.py b/upgradeclass.py
index f4650e53c..ca2c6a338 100644
--- a/upgradeclass.py
+++ b/upgradeclass.py
@@ -38,7 +38,9 @@ class InstallClass(BaseInstallClass):
"monitor",
"confirmupgrade",
"install",
+ "preinstallconfig",
"installpackages",
+ "postinstallconfig",
"instbootloader",
"bootdisk",
"complete"