import yaml
def __run__(params):
string = "nfs"
file = "/etc/mtab"
linha = []
ignored = ['ISO', 'sunrpc']
with open(file) as fname:
for line in fname:
if (string in line and "soft" in line) and (not any(value in line for value in ignored)):
linha.append(line.split(".")[0])
if linha:
return [2, "Found SOFT NFS Mount -> FIX IT NOW - %s" % linha ]
else:
return [0, "There are no SOFT NFS mount"]