From f1ffd9a0bbd4989a36dca2fd707226c240a16ec5 Mon Sep 17 00:00:00 2001 From: Jiffin Tony Thottan Date: Thu, 5 May 2016 14:52:32 +0530 Subject: 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 Upstream reference : >Change-Id: I60dea8ce116900da3c1fc9badf898e51183a2ca1 >BUG: 1333319 >Signed-off-by: Jiffin Tony Thottan >Reviewed-on: http://review.gluster.org/14225 >Smoke: Gluster Build System >NetBSD-regression: NetBSD Build System >CentOS-regression: Gluster Build System >Reviewed-by: soumya k >Reviewed-by: Kaleb KEITHLEY >(cherry picked from commit 5440bad91026f27399df51856176aef85c1fcf4d) Change-Id: I60dea8ce116900da3c1fc9badf898e51183a2ca1 BUG: 1336798 Signed-off-by: Jiffin Tony Thottan Reviewed-on: http://review.gluster.org/14396 Smoke: Gluster Build System Reviewed-by: Kaleb KEITHLEY Tested-by: Kaleb KEITHLEY NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- extras/ganesha/scripts/dbus-send.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extras/ganesha/scripts/dbus-send.sh') diff --git a/extras/ganesha/scripts/dbus-send.sh b/extras/ganesha/scripts/dbus-send.sh index 0b69be52c62..14af095464d 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 \ -- cgit