summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-06-29 21:03:26 +0000
committerJeremy Katz <katzj@redhat.com>2003-06-29 21:03:26 +0000
commit79c97fcdf4b7e01856b3cede6036d87e05b1b091 (patch)
tree838e51a6e16e73e54e72fefebf9dc533cb98b404 /isys
parent8a38c76f2b93138a6e00dc70da0e2204ad93d6b0 (diff)
downloadanaconda-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 'isys')
-rw-r--r--isys/isys.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/isys/isys.py b/isys/isys.py
index f7e89b321..09cdc541c 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -445,10 +445,13 @@ def pumpNetDevice(device):
# otherwise
return _isys.pumpnetdevice(device)
-def readExt2Label(device):
- makeDevInode(device, "/tmp/disk")
- label = _isys.e2fslabel("/tmp/disk");
- os.unlink("/tmp/disk")
+def readExt2Label(device, makeDevNode = 1):
+ if makeDevNode:
+ makeDevInode(device, "/tmp/disk")
+ label = _isys.e2fslabel("/tmp/disk");
+ os.unlink("/tmp/disk")
+ else:
+ label = _isys.e2fslabel(device)
return label
def ext2IsDirty(device):