From c107569dcd9bff86e37038b2a62118fdd429df50 Mon Sep 17 00:00:00 2001 From: Jiffin Tony Thottan Date: Fri, 11 Sep 2015 14:25:14 +0530 Subject: extras/hookscripts : introducing additional check in S31ganesha-start.sh New export file with default configuration will be created for a volume when it is started again. This patch will create new export file only when it is not present. This change is required for scenarios such as snapshot restore , node reboot etc. Change-Id: I34123911f176dcb29d5c016aa097af3a3b2c727b BUG: 1261444 Signed-off-by: Jiffin Tony Thottan Reviewed-on: http://review.gluster.org/12219 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY Reviewed-by: Niels de Vos --- extras/hook-scripts/start/post/S31ganesha-start.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'extras/hook-scripts') diff --git a/extras/hook-scripts/start/post/S31ganesha-start.sh b/extras/hook-scripts/start/post/S31ganesha-start.sh index a657b00055f..9ca07e5a8d6 100755 --- a/extras/hook-scripts/start/post/S31ganesha-start.sh +++ b/extras/hook-scripts/start/post/S31ganesha-start.sh @@ -113,7 +113,10 @@ function start_ganesha() cut -d"=" -f2) if [ "$ganesha_value" = "on" -a "$is_exported" = "no" ] then - write_conf $VOL > $GANESHA_DIR/exports/export.$VOL.conf + if [ ! -e $GANESHA_DIR/exports/export.$VOL.conf ] + then + write_conf $VOL > $GANESHA_DIR/exports/export.$VOL.conf + fi start_ganesha $VOL else exit 0 -- cgit