Files
168 lines
6.1 KiB
Plaintext
168 lines
6.1 KiB
Plaintext
#
import os
# To search for more types of errors, add the regex to the list below
]
def get_devices(device_dir, logger):
continue
device = [d for d in devices
if device:
def get_errors(minutes):
errors = {}
def comment_fstab(mount_point):
else:
if __name__ == '__main__':
print "Usage: %s CONF_FILE" % sys.argv[0].split('/')[-1]
devices = get_devices(device_dir, logger)
if count >= error_limit:
if device:
logger.info("Unmounting %s with %d errors" %
logger.info("Commenting out %s from /etc/fstab" %
comment_fstab(mount_point)