|
|
|
@ -248,7 +248,7 @@ class fillVars(object, glob_attr):
|
|
|
|
|
# parse all parted lines started with Disk and started with number
|
|
|
|
|
floppyData = self.removeFloppy()
|
|
|
|
|
execProg = self.getProgPath("/usr/sbin/parted")
|
|
|
|
|
execStr = '%s -l'%execProg
|
|
|
|
|
execStr = '%s -lm'%execProg
|
|
|
|
|
if not execProg:
|
|
|
|
|
cl_overriding.printERROR(_("Command not found '%s'")%"parted")
|
|
|
|
|
cl_overriding.exit(1)
|
|
|
|
@ -258,14 +258,14 @@ class fillVars(object, glob_attr):
|
|
|
|
|
if res is False:
|
|
|
|
|
cl_overriding.printERROR(_("Cann't execute '%s'")%execStr)
|
|
|
|
|
cl_overriding.exit(1)
|
|
|
|
|
partedLines = filter(lambda x: x.startswith("Disk") or
|
|
|
|
|
partedLines = filter(lambda x: x.startswith("/dev/") or
|
|
|
|
|
x.strip()[:1].isdigit(), res )
|
|
|
|
|
for line in partedLines:
|
|
|
|
|
# split data
|
|
|
|
|
parts = filter(lambda x: x, line.strip().split(' '))
|
|
|
|
|
parts = filter(lambda x: x, line.strip().split(':'))
|
|
|
|
|
# if start device description
|
|
|
|
|
if parts[0] == "Disk":
|
|
|
|
|
curDevice = parts[1][:-1]
|
|
|
|
|
if parts[0].startswith('/dev/'):
|
|
|
|
|
curDevice = parts[0]
|
|
|
|
|
continue
|
|
|
|
|
# if first part is number then it is partition description
|
|
|
|
|
if parts[0].isdigit():
|
|
|
|
@ -279,6 +279,7 @@ class fillVars(object, glob_attr):
|
|
|
|
|
else:
|
|
|
|
|
disk_hash[partition]['part'] = parts[4]
|
|
|
|
|
disk_hash[partition]['size'] = parts[3]
|
|
|
|
|
disk_hash[partition]['format'] = parts[4]
|
|
|
|
|
# fill format, name and uuid
|
|
|
|
|
execStr = self.getProgPath('/sbin/blkid')
|
|
|
|
|
if not execStr:
|
|
|
|
|