summaryrefslogtreecommitdiffstats
path: root/fsset.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-08-09 01:53:48 +0000
committerMike Fulbright <msf@redhat.com>2001-08-09 01:53:48 +0000
commite56a3730f68c003a52e16600feee47a90fba6b07 (patch)
tree6689ea7fc3307e737ac2a297a10554a3b40f4b72 /fsset.py
parentf740a0591ae5039847c25fbbf273918ac85f8578 (diff)
downloadanaconda-e56a3730f68c003a52e16600feee47a90fba6b07.tar.gz
anaconda-e56a3730f68c003a52e16600feee47a90fba6b07.tar.xz
anaconda-e56a3730f68c003a52e16600feee47a90fba6b07.zip
restore fstab if we started to migrate and found there was not enough space to upgrade
Diffstat (limited to 'fsset.py')
-rw-r--r--fsset.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/fsset.py b/fsset.py
index 1f549294e..cd79dae53 100644
--- a/fsset.py
+++ b/fsset.py
@@ -321,6 +321,11 @@ class ext2FileSystem(extFileSystem):
raise RuntimeError, ("Trying to migrate ext2 to something other "
"than ext3")
+ # if journal already exists skip
+ if isys.ext2HasJournal(devicePath, makeDevNode = 0):
+ log("Skipping migration of %s, has a journal already.\n" % devicePath)
+ return
+
rc = iutil.execWithRedirect("/usr/sbin/tune2fs",
["tunefs", "-j", devicePath ],
stdout = "/dev/tty5",
@@ -584,6 +589,11 @@ class FileSystemSet:
open (prefix + "/etc/mtab", "w+")
f.close ()
+ def restoreMigratedFstab(self, prefix):
+ fname = prefix + "/etc/fstab"
+ if os.access(fname + ".rpmsave", os.R_OK):
+ os.rename(fname + ".rpmsave", fname)
+
def migratewrite(self, prefix):
fname = prefix + "/etc/fstab"
f = open (fname, "r")