From 1f7c26edbbb9fa7cfc41ba2f71f6214495c5e4de Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Thu, 30 Apr 2015 14:14:14 +0530 Subject: snapshot/scheduler: Use os.path.realpath() for path validation In order to accomodate systems, where /var/run is a symlink to /run, we are using os.path.realpath() for path validations. Change-Id: I4eae536867ec6c88f92c762b92f5c1966b622bde BUG: 1218585 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/10464 Tested-by: Gluster Build System Reviewed-by: Rajesh Joseph Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.org/10573 --- extras/snap_scheduler/snap_scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extras/snap_scheduler/snap_scheduler.py') diff --git a/extras/snap_scheduler/snap_scheduler.py b/extras/snap_scheduler/snap_scheduler.py index 7353e4f2df7..e7e5fda812f 100755 --- a/extras/snap_scheduler/snap_scheduler.py +++ b/extras/snap_scheduler/snap_scheduler.py @@ -67,7 +67,7 @@ def scheduler_status(): global scheduler_enabled try: f = os.path.realpath(GCRON_TASKS) - if f != GCRON_ENABLED or not os.path.exists(GCRON_ENABLED): + if f != os.path.realpath(GCRON_ENABLED) or not os.path.exists(GCRON_ENABLED): log.info("Snapshot scheduler is currently disabled.") scheduler_enabled = False else: -- cgit