FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian KDE

 
 
LinkBack Thread Tools
 
Old 06-26-2012, 12:08 PM
Vratislav Podzimek
 
Default Comment out the fstab lines with unknown filesystem rather then ignoring them

When doing upgrade, there is no need to ignore the fstab lines with filesystem
Anaconda does not support. We can leave the lines as they are and just comment
them out to prevent mounting problems during the next boot.

Resolves: rhbz#754213
---
fsset.py | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/fsset.py b/fsset.py
index 9636003..64d948d 100644
--- a/fsset.py
+++ b/fsset.py
@@ -1297,6 +1297,20 @@ class AutoFileSystem(PsudoFileSystem):

fileSystemTypeRegister(AutoFileSystem())

+class unknownFileSystem(FileSystemType):
+ def __init__(self, fstype):
+ FileSystemType.__init__(self)
+ self.partedFileSystemType = None
+ self.formattable = 0
+ self.checked = 0
+ self.linuxnativefs = 0
+ self.supported = 0
+
+ self.name = fstype
+
+ def formatDevice(self, entry, progress, chroot='/'):
+ pass
+
class BindFileSystem(PsudoFileSystem):
def __init__(self):
PsudoFileSystem.__init__(self, "bind")
@@ -1456,6 +1470,10 @@ class FileSystemSet:
options = entry.getOptions()
if entry.mountpoint == "/" and options is not None:
options = options.replace(",_netdev", ",_rnetdev")
+
+ # comment out lines with unknown filesystem
+ if isinstance(entry.fsystem, unknownFileSystem):
+ device = "#" + device
fstab = fstab + format % (device, entry.mountpoint,
entry.fsystem.getName(),
options, entry.fsck,
@@ -2969,8 +2987,8 @@ def readFstab (anaconda):
break
# "none" is valid as an fs type for bind mounts (#151458)
if fsystem is None and (string.find(fields[3], "bind") == -1):
- continue
-
+ fsystem = unknownFileSystem(fstotry[0])
+
label = None
if fields[0] == "none":
device = Device()
--
1.7.4.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 11:47 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org