diff options
author | Jeremy Katz <katzj@redhat.com> | 2003-06-29 21:03:26 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2003-06-29 21:03:26 +0000 |
commit | 79c97fcdf4b7e01856b3cede6036d87e05b1b091 (patch) | |
tree | 838e51a6e16e73e54e72fefebf9dc533cb98b404 /fsset.py | |
parent | 8a38c76f2b93138a6e00dc70da0e2204ad93d6b0 (diff) | |
download | anaconda-79c97fcdf4b7e01856b3cede6036d87e05b1b091.tar.gz anaconda-79c97fcdf4b7e01856b3cede6036d87e05b1b091.tar.xz anaconda-79c97fcdf4b7e01856b3cede6036d87e05b1b091.zip |
if there is already a label on the disk, use it instead of making up our
own new one (#92100)
Diffstat (limited to 'fsset.py')
-rw-r--r-- | fsset.py | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1224,7 +1224,10 @@ class FileSystemSet: sys.exit(0) def labelEntry(self, entry, chroot): - if entry.device.doLabel is not None: + label = entry.device.getLabel() + if label: + entry.setLabel(label) + elif entry.device.doLabel is not None: entry.fsystem.labelDevice(entry, chroot) def formatEntry(self, entry, chroot): @@ -1629,6 +1632,12 @@ class Device: def getName(self): return self.__class__.__name__ + def getLabel(self): + try: + return isys.readExt2Label(self.setupDevice(), makeDevNode = 0) + except: + return "" + class DevDevice(Device): """Device with a device node rooted in /dev that we just always use the pre-created device node for.""" |