diff options
author | Chris Lumens <clumens@redhat.com> | 2006-07-21 18:51:56 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2006-07-21 18:51:56 +0000 |
commit | 62ad933663dc59fd48b4777a24ae2f7fa6bd85b3 (patch) | |
tree | 7c0cda70767570d1e1b5b5e9bb398506d151481f /partitions.py | |
parent | 343b276af5449958b409ad6b4a16cb7bd77c164b (diff) | |
download | anaconda-62ad933663dc59fd48b4777a24ae2f7fa6bd85b3.tar.gz anaconda-62ad933663dc59fd48b4777a24ae2f7fa6bd85b3.tar.xz anaconda-62ad933663dc59fd48b4777a24ae2f7fa6bd85b3.zip |
Show preexisting label if any exists to the UI and the mount point combo
(#149375)
Diffstat (limited to 'partitions.py')
-rw-r--r-- | partitions.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/partitions.py b/partitions.py index 3934fb76a..f13ac6b54 100644 --- a/partitions.py +++ b/partitions.py @@ -172,10 +172,15 @@ class Partitions: fs = partedUtils.sniffFilesystemType(theDev) + fslabel = None if fs is None: fsystem = fsset.fileSystemTypeGet("foreign") else: fsystem = fsset.fileSystemTypeGet(fs) + try: + fslabel = isys.readFSLabel(theDev, makeDevNode=0) + except: + fslabel = None mnt = None format = 0 @@ -188,7 +193,8 @@ class Partitions: raidspares = spares, mountpoint = mnt, preexist = 1, - chunksize = chunk) + chunksize = chunk, + fslabel = fslabel) spec.size = spec.getActualSize(self, diskset) self.addRequest(spec) @@ -234,17 +240,24 @@ class Partitions: theDev = "/dev/%s/%s" %(vg, lv) fs = partedUtils.sniffFilesystemType(theDev) + fslabel = None + if fs is None: fsystem = fsset.fileSystemTypeGet("foreign") else: fsystem = fsset.fileSystemTypeGet(fs) + try: + fslabel = isys.readFSLabel(theDev, makeDevNode=0) + except: + fslabel = None mnt = None format = 0 spec = partRequests.LogicalVolumeRequestSpec(fsystem, format = format, size = lvsize, volgroup = vgid, - lvname = lv, mountpoint = mnt, preexist = 1) + lvname = lv, mountpoint = mnt, fslabel = fslabel, + preexist = 1) self.addRequest(spec) for vg in lvm.partialvgs(): |