mirror of
https://github.com/ranl/monitor-utils.git
synced 2024-11-25 00:43:42 +01:00
check_deep_fs: realpath check
This commit is contained in:
parent
c920dfd133
commit
ae93696f89
@ -6,7 +6,7 @@ Monitor a mount on the filesystem and all of it sub mounts
|
|||||||
|
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os.path
|
||||||
|
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
@ -43,7 +43,7 @@ def get_mount_point(loc):
|
|||||||
Get the mount point of the path
|
Get the mount point of the path
|
||||||
'''
|
'''
|
||||||
|
|
||||||
mount = os.readlink(os.path.abspath(loc))
|
mount = os.path.realpath(os.path.abspath(loc))
|
||||||
while not os.path.ismount(mount):
|
while not os.path.ismount(mount):
|
||||||
mount = os.path.dirname(mount)
|
mount = os.path.dirname(mount)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user