From c920dfd13315e45e0fde5b4d0b9c740becc9cc0a Mon Sep 17 00:00:00 2001 From: ranl Date: Tue, 31 Dec 2013 15:09:09 +0200 Subject: [PATCH] check_deep_fs: get realpath (in case of symlinks) --- nagios/check_deep_fs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nagios/check_deep_fs.py b/nagios/check_deep_fs.py index 7ec4906..7e0a655 100644 --- a/nagios/check_deep_fs.py +++ b/nagios/check_deep_fs.py @@ -6,7 +6,7 @@ Monitor a mount on the filesystem and all of it sub mounts from optparse import OptionParser import subprocess -import os.path +import os def parse_args(): @@ -43,7 +43,7 @@ def get_mount_point(loc): Get the mount point of the path ''' - mount = os.path.abspath(loc) + mount = os.readlink(os.path.abspath(loc)) while not os.path.ismount(mount): mount = os.path.dirname(mount)