Blob Blame History Raw
From 4cb6e56e64737efdc853b9357023f656f34ef389 Mon Sep 17 00:00:00 2001
From: Meghana M <mmadhusu@redhat.com>
Date: Mon, 29 Jun 2015 06:16:47 +0530
Subject: [PATCH 192/200] NFS-Ganesha : Exporting volume fails

Due to a recent fix, the dbus-send.sh looked
for a .export_added file even before it was
created. This resulted in the ganesha.enable
option failing consistently. Fixing it.

This is the backport of the fix merged upstream,
http://review.gluster.org/#/c/11456/

Change-Id: I2bba25247763b88ab7b964d0f94fcecca98b0c9f
BUG: 1236556
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/51927
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
---
 extras/ganesha/scripts/dbus-send.sh                |    2 +-
 extras/hook-scripts/start/post/S31ganesha-start.sh |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/extras/ganesha/scripts/dbus-send.sh b/extras/ganesha/scripts/dbus-send.sh
index b96bba9..d838cab 100755
--- a/extras/ganesha/scripts/dbus-send.sh
+++ b/extras/ganesha/scripts/dbus-send.sh
@@ -22,7 +22,7 @@ function check_cmd_status()
 function dynamic_export_add()
 {
         count=`ls -l $GANESHA_DIR/exports/*.conf | wc -l`
-        if [ "$count" = "0" ] ;
+        if [ "$count" = "1" ] ;
                 then
                 EXPORT_ID=2
         else
diff --git a/extras/hook-scripts/start/post/S31ganesha-start.sh b/extras/hook-scripts/start/post/S31ganesha-start.sh
index dc3eaea..f1ca72b 100755
--- a/extras/hook-scripts/start/post/S31ganesha-start.sh
+++ b/extras/hook-scripts/start/post/S31ganesha-start.sh
@@ -61,7 +61,7 @@ function write_conf()
 function export_add()
 {
         count=`ls -l $GANESHA_DIR/exports/*.conf | wc -l`
-        if [ "$count" = "0" ] ;
+        if [ "$count" = "1" ] ;
                 then
                 EXPORT_ID=2
         else
-- 
1.7.1