summaryrefslogtreecommitdiffstats
path: root/fsset.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-08-02 07:51:26 +0000
committerJeremy Katz <katzj@redhat.com>2002-08-02 07:51:26 +0000
commit9e387ceb73c7fb15bc04d473ccccdfac1d3fddfa (patch)
treeeffb9dab2220a849343c4309a969f56cb0123491 /fsset.py
parent5db25af03323724b0fdf88de2ca88a6845836819 (diff)
downloadanaconda-9e387ceb73c7fb15bc04d473ccccdfac1d3fddfa.tar.gz
anaconda-9e387ceb73c7fb15bc04d473ccccdfac1d3fddfa.tar.xz
anaconda-9e387ceb73c7fb15bc04d473ccccdfac1d3fddfa.zip
handle auto in fstabs sanely but be careful about it (#67120)
Diffstat (limited to 'fsset.py')
-rw-r--r--fsset.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/fsset.py b/fsset.py
index 5534f05e8..af254a51a 100644
--- a/fsset.py
+++ b/fsset.py
@@ -1828,7 +1828,6 @@ def readFstab (path):
fsystem = fileSystemTypeGet(fields[2])
label = None
-
if fields[0] == "none":
device = Device()
elif len(fields) >= 6 and fields[0].startswith('LABEL='):
@@ -1860,7 +1859,18 @@ def readFstab (path):
device = makeDevice(fields[0][5:])
else:
continue
-
+
+ # if they have a filesystem being mounted as auto, we need
+ # to sniff around a bit to figure out what it might be
+ # if we fail at all, though, just ignore it
+ if fsystem == "auto" and device.getDevice() != "none":
+ try:
+ tmp = partedUtils.sniffFilesystemType("/dev/%s" %(device.setupDevice(),))
+ if tmp is not None:
+ fsystem = tmp
+ except:
+ pass
+
entry = FileSystemSetEntry(device, fields[1], fsystem, fields[3],
origfsystem=fsystem)
if label: