socialnerds/hive
socialnerds
/
hive
Archived
1
0
Fork 0
This commit is contained in:
David 2012-05-15 19:26:59 +02:00
parent 51f5b703cc
commit 4ec300ce8c
1 changed files with 11 additions and 4 deletions

View File

@ -27,11 +27,15 @@ hold="nothing"
holdblocks = 0
blockcount = 0
counter = 0
partsnew = []
blocksnew = []
for part in partitions:
if hold in part:
print "part %s contains hold %s" %(part, hold)
blockcount = blockcount + int(blocks[counter])
print blockcount
partsnew.append(part)
blocksnew.append(blocks[counter])
else:
print "part %s does not contain hold %s" %(part, hold)
hold = part
@ -39,18 +43,21 @@ for part in partitions:
blockcount = 0
counter += 1
partitions = partsnew
blocks = blocksnew
exit()
#getting mountpoints to devices
counter = 0
for item in partitions:
for line in mounts.split("\n"):
if line and item in line:
mountpoints.append(line.split()[1])
break
# mountpoints.append("%s not mounted" %(item))
if line.split()[1] not in mountpoints[counter]:
mountpoints.append("%s not mounted" %(item))
counter += 1