Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian KDE (http://www.linux-archive.org/debian-kde/)
-   -   Comment out the fstab lines with unknown filesystem rather then ignoring them (http://www.linux-archive.org/debian-kde/677302-comment-out-fstab-lines-unknown-filesystem-rather-then-ignoring-them.html)

Vratislav Podzimek 06-26-2012 12:08 PM

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


All times are GMT. The time now is 10:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.