summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2015-04-30 14:14:14 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-05 02:44:52 -0700
commit466289f75522c7e6662ccfd17cbe2f000667f77e (patch)
tree933b56fd74c8526082ec46b2730008e338d6c973 /extras
parentb7da3d569dfa6d6c27480a74a345cf0e166e3fef (diff)
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: 1216931 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/10464 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'extras')
-rwxr-xr-xextras/snap_scheduler/snap_scheduler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/extras/snap_scheduler/snap_scheduler.py b/extras/snap_scheduler/snap_scheduler.py
index 8aa65b6c9ae..68ac08937cb 100755
--- a/extras/snap_scheduler/snap_scheduler.py
+++ b/extras/snap_scheduler/snap_scheduler.py
@@ -68,7 +68,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: