summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArjun Sharma <arjsharm@redhat.com>2019-09-26 17:21:56 +0530
committerArjun Sharma <arjsharm@redhat.com>2019-09-26 17:28:00 +0530
commit3ac2579229ff6e6a2ced7b76a20b9f2822cced1a (patch)
tree59dba3c7ffca48ea1e64baa3d9ca8d064fa02ac5
parent41ebb98e91d487a4d0e20f2a3d2bbce39ea56ab5 (diff)
Using egrep instead of grep
Since egrep treats a pattern as extended regular expression it is more suited to be used in this case. The current usage of grep fails to identify the expression after the first pipe. Change-Id: Id02f884356048c56066a406937f8d86456ee8bd7 Signed-off-by: Arjun Sharma <arjsharm@redhat.com>
-rwxr-xr-xglustolibs-gluster/glustolibs/gluster/mount_ops.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/mount_ops.py b/glustolibs-gluster/glustolibs/gluster/mount_ops.py
index cc63d05..c41ef85 100755
--- a/glustolibs-gluster/glustolibs/gluster/mount_ops.py
+++ b/glustolibs-gluster/glustolibs/gluster/mount_ops.py
@@ -261,7 +261,7 @@ def is_mounted(volname, mpoint, mserver, mclient, mtype, user='root'):
return True
return False
else:
- ret, _, _ = g.run(mclient, "mount | grep %s | grep %s | grep \"%s\""
+ ret, _, _ = g.run(mclient, "mount | egrep '%s | %s' | grep \"%s\""
% (volname, mpoint, mserver), user)
if ret == 0:
g.log.debug("Volume %s is mounted at %s:%s" % (volname, mclient,