diff options
author | Jiffin Tony Thottan <jthottan@redhat.com> | 2015-09-11 14:25:14 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2015-09-24 01:53:41 -0700 |
commit | c107569dcd9bff86e37038b2a62118fdd429df50 (patch) | |
tree | 416421eccc0ae40946cb4cc0394ddb0ca6dea1cb /extras | |
parent | c94f5bdf309f024c30cc4796b528edb1e1b4a48b (diff) |
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 <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/12219
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'extras')
-rwxr-xr-x | extras/hook-scripts/start/post/S31ganesha-start.sh | 5 |
1 files changed, 4 insertions, 1 deletions
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 |