summaryrefslogtreecommitdiffstats
path: root/upgrade.py
diff options
context:
space:
mode:
authorbfox <bfox>2001-03-14 16:30:20 +0000
committerbfox <bfox>2001-03-14 16:30:20 +0000
commitfa6668bff9d306328b14a01e2f597693da84e317 (patch)
tree189a0be18858872c4de155a143b66d1c350b4f82 /upgrade.py
parentb41445baedb1eb254519c614b8ce364e20f8c993 (diff)
downloadanaconda-fa6668bff9d306328b14a01e2f597693da84e317.tar.gz
anaconda-fa6668bff9d306328b14a01e2f597693da84e317.tar.xz
anaconda-fa6668bff9d306328b14a01e2f597693da84e317.zip
don't append / if mnt point is /
Diffstat (limited to 'upgrade.py')
-rw-r--r--upgrade.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/upgrade.py b/upgrade.py
index 6a4748b44..de83f4efc 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -166,11 +166,19 @@ def createSwapFile(instPath, theFstab, mntPoint, size, progressWindow):
instPath = "/mnt/loophost"
prefix = "/initrd/loopfs"
- file = mntPoint + "/SWAP"
+ if mntPoint != "/":
+ file = mntPoint + "/SWAP"
+ else:
+ file = "/SWAP"
+
count = 0
while (swapfileExists(instPath + file)):
count = count + 1
- file = "%s/SWAP-%d" % mntPoint, count
+ tmpFile = "/SWAP-%d" % (count)
+ if mntPoint != "/":
+ file = mntPoint + tmpFile
+ else:
+ file = tmpFile
theFstab.addMount(file, size, "swap")
theFstab.turnOnSwap(instPath, progressWindow)