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