summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Talur <rtalur@redhat.com>2013-08-08 03:19:43 +0530
committerAnand Avati <avati@redhat.com>2013-08-07 14:56:33 -0700
commit993001dadf3b1706816b7762749a4c4426ac86df (patch)
tree1dad8edc04b63a2a7ca32f6b0a0000841693b77e
parent0f77e30c903e6f71f30dfd6165914a43998a164f (diff)
extras/hook-scripts: Don't add multiple entries in smb.conf
When volume is force started, there may be entry in smb.conf for that volume. Always check for entry before adding one. Change-Id: I44f893174a993abaa31c24c1a81bb38a58617808 BUG: 994727 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/5526 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
-rwxr-xr-xextras/hook-scripts/S30samba-start.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/extras/hook-scripts/S30samba-start.sh b/extras/hook-scripts/S30samba-start.sh
index 926fe603534..e281c7e5464 100755
--- a/extras/hook-scripts/S30samba-start.sh
+++ b/extras/hook-scripts/S30samba-start.sh
@@ -85,5 +85,7 @@ if [ $(get_smb "$VOL") = "disable" ]; then
exit 0
fi
-add_samba_share $VOL
-sighup_samba
+if ! grep --quiet "gluster-$VOL" /etc/samba/smb.conf ; then
+ add_samba_share $VOL
+ sighup_samba
+fi