diff options
author | Mike Fulbright <msf@redhat.com> | 2001-08-09 01:53:48 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2001-08-09 01:53:48 +0000 |
commit | e56a3730f68c003a52e16600feee47a90fba6b07 (patch) | |
tree | 6689ea7fc3307e737ac2a297a10554a3b40f4b72 /fsset.py | |
parent | f740a0591ae5039847c25fbbf273918ac85f8578 (diff) | |
download | anaconda-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.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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") |