...
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
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue