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:52:44 -0700 |
commit | 84367f0c9106f5a604ac05a02898d4521fa5c832 (patch) | |
tree | 5639ae0848b23e12d96ad8a867575ecfc6503059 /extras/hook-scripts | |
parent | 98fe4297131361d62d6579d0bde10a8485e4748a (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/12159
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: soumya k <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'extras/hook-scripts')
-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 |