...
This commit is contained in:
parent
51f5b703cc
commit
4ec300ce8c
15
df_check.py
15
df_check.py
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
Reference in New Issue