From 4ec300ce8c21e30035ed209e28e54452e80b8acc Mon Sep 17 00:00:00 2001 From: David Date: Tue, 15 May 2012 19:26:59 +0200 Subject: [PATCH] ... --- df_check.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/df_check.py b/df_check.py index a4192bf..7b8a695 100755 --- a/df_check.py +++ b/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