mirror of
https://github.com/ranl/monitor-utils.git
synced 2026-02-05 22:55:17 +01:00
check_deep_fs: get realpath (in case of symlinks)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user