summaryrefslogtreecommitdiffstats
path: root/installclass.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-06-07 19:38:22 +0000
committerJeremy Katz <katzj@redhat.com>2004-06-07 19:38:22 +0000
commit464e69f5e2ac8668b0c5f81cfc22fa14631bf8ad (patch)
tree1d29df9e76959eaed96446589bfd4e89d95dd1b1 /installclass.py
parent341c8d96f52967c541a66315524b9d203dd4361a (diff)
downloadanaconda-464e69f5e2ac8668b0c5f81cfc22fa14631bf8ad.tar.gz
anaconda-464e69f5e2ac8668b0c5f81cfc22fa14631bf8ad.tar.xz
anaconda-464e69f5e2ac8668b0c5f81cfc22fa14631bf8ad.zip
handle upgrade and noupgrade at the same time so that we can then easily
switch upgrade on or off and have them enable/disable-able on the command line still
Diffstat (limited to 'installclass.py')
-rw-r--r--installclass.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/installclass.py b/installclass.py
index 65acbd2d7..987723b09 100644
--- a/installclass.py
+++ b/installclass.py
@@ -178,8 +178,13 @@ class BaseInstallClass:
# 'noupgrade' can be used on the command line to force not looking
# for partitions to upgrade. useful in some cases...
cmdline = open("/proc/cmdline", "r").read()
- if cmdline.find("noupgrade") != -1:
- dispatch.skipStep("findrootparts")
+ cmdline = cmdline.split()
+ if "noupgrade" in cmdline:
+ dispatch.skipStep("findrootparts", skip = 1)
+
+ # upgrade will also always force looking for an upgrade.
+ if "upgrade" in cmdline:
+ dispatch.skipStep("findrootparts", skip = 0)
# if there's only one install class, it doesn't make much sense
# to show it