From fe7d7427b5f2ab6804bf220104ae21cc867c3054 Mon Sep 17 00:00:00 2001 From: Jiffin Tony Thottan Date: Fri, 28 Oct 2016 17:37:39 +0530 Subject: ganesha/scripts : use export id for dbus signals Currently for add export and update export parameter passed for executing those signal is "PATH". This is based on assumption that volume name and PATH will always be same. But it is wrong for subdir exports. The only reliable parameter in export configuration file is "Export_Id". Backport details > Change-Id: Ic63ff44ac7736e14502034b74beaae27292eddf9 > BUG: 1389746 > Signed-off-by: Jiffin Tony Thottan > Reviewed-on: http://review.gluster.org/15751 > Smoke: Gluster Build System > NetBSD-regression: NetBSD Build System > CentOS-regression: Gluster Build System > Reviewed-by: soumya k > Reviewed-by: Kaleb KEITHLEY > Signed-off-by: Jiffin Tony Thottan Change-Id: Ic63ff44ac7736e14502034b74beaae27292eddf9 BUG: 1396332 Signed-off-by: Jiffin Tony Thottan Reviewed-on: http://review.gluster.org/15875 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Kaleb KEITHLEY CentOS-regression: Gluster Build System --- extras/hook-scripts/start/post/S31ganesha-start.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'extras/hook-scripts/start') diff --git a/extras/hook-scripts/start/post/S31ganesha-start.sh b/extras/hook-scripts/start/post/S31ganesha-start.sh index 1b258cc0ae4..1bbeeab9567 100755 --- a/extras/hook-scripts/start/post/S31ganesha-start.sh +++ b/extras/hook-scripts/start/post/S31ganesha-start.sh @@ -61,6 +61,7 @@ echo "}" } #This function keeps track of export IDs and increments it with every new entry +#Also it adds the export dynamically by sending dbus signals function export_add() { count=`ls -l $GANESHA_DIR/exports/*.conf | wc -l` @@ -79,17 +80,13 @@ function export_add() #fi fi echo $EXPORT_ID > $GANESHA_DIR/.export_added - sed -i s/Export_Id.*/"Export_Id= $EXPORT_ID ;"/ \ + sed -i s/Export_Id.*/"Export_Id=$EXPORT_ID;"/ \ $GANESHA_DIR/exports/export.$VOL.conf echo "%include \"$GANESHA_DIR/exports/export.$VOL.conf\"" >> $CONF1 -} -#This function adds a new export dynamically by sending dbus signals -function dynamic_export_add() -{ dbus-send --print-reply --system --dest=org.ganesha.nfsd \ /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport \ -string:$GANESHA_DIR/exports/export.$VOL.conf string:"EXPORT(Path=/$VOL)" +string:$GANESHA_DIR/exports/export.$VOL.conf string:"EXPORT(Export_Id=$EXPORT_ID)" } @@ -99,7 +96,6 @@ function start_ganesha() sed -i /$VOL.conf/d $CONF1 #Create a new export entry export_add $VOL - dynamic_export_add $VOL } -- cgit