summaryrefslogtreecommitdiffstats
path: root/extras/ganesha/scripts/dbus-send.sh
diff options
context:
space:
mode:
authorJiffin Tony Thottan <jthottan@redhat.com>2016-05-05 14:52:32 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-05-05 23:19:13 -0700
commit3ebcdf6274867e875f299c81e6fe833d7571190f (patch)
tree0b8e97bb9cf104931c5325fd1e72360de27d30f3 /extras/ganesha/scripts/dbus-send.sh
parent09d4a110141394fab8fcc8498e498545e7d805bf (diff)
NFS-Ganesha : Parse the Export_Id correctly for unexporting volume
Currently export id parsed using "cut -d ' ' -f8" which might endup in giving wrong value. In case of multiple space chracter, output may differ. In this all those instance will replaced by awk call >Change-Id: I60dea8ce116900da3c1fc9badf898e51183a2ca1 >BUG: 1333319 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/14225 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: soumya k <skoduri@redhat.com> >Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> >(cherry picked from commit 5440bad91026f27399df51856176aef85c1fcf4d) Change-Id: I60dea8ce116900da3c1fc9badf898e51183a2ca1 BUG: 1333528 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/14231 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com>
Diffstat (limited to 'extras/ganesha/scripts/dbus-send.sh')
-rwxr-xr-xextras/ganesha/scripts/dbus-send.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/extras/ganesha/scripts/dbus-send.sh b/extras/ganesha/scripts/dbus-send.sh
index 87e616c23a2..9f638ca4d6b 100755
--- a/extras/ganesha/scripts/dbus-send.sh
+++ b/extras/ganesha/scripts/dbus-send.sh
@@ -91,7 +91,7 @@ string:"EXPORT(Path=/$VOL)"
function dynamic_export_remove()
{
removed_id=`cat $GANESHA_DIR/exports/export.$VOL.conf |\
-grep Export_Id | cut -d ' ' -f8`
+grep Export_Id | awk -F"[=,;]" '{print$2}'| tr -d '[[:space:]]'`
check_cmd_status `echo $?`
dbus-send --print-reply --system \
--dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr \